Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

HTML Tags not recognized in Registation Email

Open LaClick opened this issue 10 years ago • 13 comments

Hello, The mails we receive when having a new registration are not html but raw text. We see the html tags in the mail boby.

I am talking about the body mail in Administration->Email->Registration->Body It works ok for the invitation mail and the admin registration mail.

Can some one help us.

Best regards, Xavier RockeChat implementation : www.laclick.fr

LaClick avatar May 11 '16 09:05 LaClick

I'm hosting @LaClick and he is running latest (0.30.0).

I don't understand why, but on the registration email (only), I get a "Content-Type: text/plain".

Header and Footer are empty and the Registration is:

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body>
        Bonjour [fname] <a href="mailto://[email protected]">[email protected]</a>
    </body>
</html>

I tried to look in the code, but it looked fine :) Do you have any idea what is happening?

pierreozoux avatar May 11 '16 12:05 pierreozoux

Oops, sorry I found the issue! \o/

I send a fix!

pierreozoux avatar May 11 '16 12:05 pierreozoux

You did? I was just committing the changes to develop :)

marceloschmidt avatar May 11 '16 12:05 marceloschmidt

You did?

pierreozoux avatar May 11 '16 12:05 pierreozoux

Was this your solution? https://github.com/RocketChat/Rocket.Chat/commit/a516cc40744c1ce8229a2c205c82b715f7a67e03

marceloschmidt avatar May 11 '16 12:05 marceloschmidt

Yes :) line 41! Great!

Thanks a lot for your reactivity!

pierreozoux avatar May 11 '16 12:05 pierreozoux

Thanks! Let me close this one now ;)

marceloschmidt avatar May 11 '16 12:05 marceloschmidt

Just tested, and I got Internal server error:

app_1 | [methods] registerUser -> userId: null , arguments:  { '0': 
app_1 |    { name: '$$',
app_1 |      emailOrUsername: '$$',
app_1 |      email: '$$',
app_1 |      pass: '$$',
app_1 |      'confirm-pass': '$$' } }
app_1 | Exception while invoking method 'registerUser' TypeError: undefined is not a function
app_1 |     at Object.Accounts.emailTemplates.verifyEmail.html (server/lib/accounts.coffee:26:2)
app_1 |     at AccountsServer.Accounts.sendVerificationEmail (password_server.js:775:43)
app_1 |     at [object Object].Meteor.methods.registerUser (server/methods/registerUser.coffee:20:13)
app_1 |     at [object Object].methodsMap.(anonymous function) (server/lib/debug.js:23:26)
app_1 |     at maybeAuditArgumentChecks (livedata_server.js:1698:12)
app_1 |     at livedata_server.js:708:19
app_1 |     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
app_1 |     at livedata_server.js:706:40
app_1 |     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
app_1 |     at livedata_server.js:704:46

pierreozoux avatar May 11 '16 12:05 pierreozoux

Ahh :( I'll fix that ASAP! Thanks

marceloschmidt avatar May 11 '16 12:05 marceloschmidt

Now it looks that the HTML interpretor, treats LineFeeds as
, I have to delete all LF to have the goog looking.

LaClick avatar May 11 '16 13:05 LaClick

By the way is it possible to have the verification mail adress mail configurable

LaClick avatar May 11 '16 13:05 LaClick

@pierreozoux could you try now? Thanks.

marceloschmidt avatar May 11 '16 13:05 marceloschmidt

It is fixed, thanks!

And you can close the issue.

pierreozoux avatar May 27 '16 12:05 pierreozoux