Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email message formatting #2840

Closed
1 task done
jncraig opened this issue Jun 12, 2019 · 22 comments
Closed
1 task done

Email message formatting #2840

jncraig opened this issue Jun 12, 2019 · 22 comments

Comments

@jncraig
Copy link

jncraig commented Jun 12, 2019

Description of bug

Email message formatting needs to be cleaned up: Password Reset Message

Steps to reproduce

Click the password reset link on the login page

Current result

I get a message like this:

Dear Joe Craig, You have requested a Password Reset Token from DNN Open Source Community. Please login using the following information: Website Address: dnnsoftware.org
Username: jncraig Link to reset password: https://dnnsoftware.org?ctl=PasswordReset&resetToken=57e12270-0ee8-4398-a0ec-9151e26e358d Sincerely, DNN Open Source Community *Note: If you did not request a Password Reset Token, please tell us immediately in the forums: https://dnncommunity.org/forums/aff/13 

Expected result

Dear Joe Craig,

You have requested a Password Reset Token from DNN Open Source Community.

Please login using the following information:
Website Address: dnnsoftware.org
Username: jncraig
Link to reset password: https://dnnsoftware.org?ctl=PasswordReset&resetToken=57e12270-0ee8-4398-a0ec-9151e26e358d 

Sincerely,
DNN Open Source Community

*Note: If you did not request a Password Reset Token, please tell us immediately in the forums: https://dnncommunity.org/forums/aff/13 

Screenshots

If applicable, provide screenshots to help explain your problem.

Error log

Paste the error log that is related to this issue.

Additional context

A few days ago I responded to a message over on Aderson's Open Help Slack about a similar problem.  So, this probably needs fixing in the DNN source, too.

Also, probably all email messages need to be reviewed and cleaned up.

Affected version

  • 9.3.2 or whatever version dnnsoftware.org is running.

Affected browser

Not a browser issue.

@markandcurry
Copy link

Did anything happen with this? I'm experiencing the same issue.

@valadas
Copy link
Contributor

valadas commented Jul 16, 2019

@markandcurry not yet no, should be a simple fix though, just editing the resource file I guess... As a workaround, it can be edited in the localization resource files. I think it is in global resources, if you search for email you should see a few keys that are the email templates...

@sleupold
Copy link
Contributor

This should be an issue with the ressource key on dnnsorftware.com, it has not been reported as issue on DNN platform itself.
Info should be forwarded to DNN Corp, who is maintaining dnnsoftware.com (and closed here)

@valadas
Copy link
Contributor

valadas commented Jul 16, 2019

Actually it is reported as dnnsoftware.ORG, le me try an install here...

@valadas
Copy link
Contributor

valadas commented Jul 16, 2019

@sleupold is right, this is a content issue, not the platform. It works fine with a clean install here. Let me see if I can move this to the right place...

@valadas
Copy link
Contributor

valadas commented Jul 16, 2019

Since this is content, I have created this forum post, I am closing this and the discussion can continue at:

https://dnncommunity.org/forums/aft/148

@valadas valadas closed this as completed Jul 16, 2019
@Tychodewaard
Copy link
Contributor

I just tested locally (9.3.2, nvquicksite) and I see the following (below) in globalresources.resx. As there is no html, it explaines why this is not displaying properly in the mailclient. If you reopen the issue, I'll create a PR.

Dear [User:DisplayName],

You have requested a Password Reset Token from [Portal:PortalName].

Please login using the following information:

Website Address: [Portal:URL]
Username: [User:Username]

Link to reset password: [Portal:PASSWORDREMINDERURL]?ctl=PasswordReset&resetToken=[Membership:PasswordResetToken]

Sincerely,
[Portal:PortalName]

*Note: If you did not request a Password Reset Token, please disregard this Message.

@sleupold
Copy link
Contributor

@Tychodewaard
If there are no html tags, the email should be sent as plain text with the current formattion. It is important to check, why either line breaks are eliminated or the mail is unexpectedly sent as HTML.

@valadas valadas reopened this Jul 17, 2019
@valadas
Copy link
Contributor

valadas commented Jul 17, 2019

I reopened this for further testing, but @sleupold is right though. Could this be that it is email client specific or some token that is replaced contains html ? @jncraig

@markandcurry
Copy link

markandcurry commented Jul 17, 2019

I was able to get around this by encoding the messages as ASCII HMTL entities and updating the relevant fields in their respective .resx files. Kind of a hack, but it solved the problem for the time being.

@valadas
Copy link
Contributor

valadas commented Jul 17, 2019

@markandcurry can you let us know which email client you are using please, wanna see if the plain-text vs html format is related to some specific clients or what... Thanks. Just wanna see why it works fine here using outlook and a clean install.

@Tychodewaard
Copy link
Contributor

I use Office 365 (outlook.office.com)
I have no breaks unless I add it in the globalresources.resx. And the reset link is not a link either.

@sleupold
Copy link
Contributor

@Tychodewaard
the issue on dnnsoftware.org might have been caused by by the SMTP server (Sendgrid) which adds a hidden image to the end, i.e. it turns the plain text mail into an HTML mail but does not convert the line breaks to br tokens.

@valadas
Copy link
Contributor

valadas commented Jul 18, 2019

Oh, that makes sense. So I guess it would be nice to modify the default text to actually be html, right?

@valadas valadas added this to the 9.4.1 milestone Jul 29, 2019
@valadas
Copy link
Contributor

valadas commented Sep 26, 2019

Just double-checking we do have an agreement to make the default template html? I don't believe there are much mail clients that don't support html these days right?

@valadas valadas modified the milestones: 9.4.1, 9.4.2 Sep 26, 2019
@valadas valadas modified the milestones: 9.4.2, 9.4.3 Nov 5, 2019
@valadas valadas modified the milestones: 9.4.3, 9.5.0 Nov 21, 2019
@valadas valadas modified the milestones: 9.5.0, 9.5.1 Jan 30, 2020
@valadas valadas modified the milestones: 9.5.1, 9.6.0 Mar 18, 2020
@valadas valadas removed this from the 9.6.0 milestone Apr 14, 2020
@valadas valadas added this to the 9.6.1 milestone Apr 14, 2020
@valadas valadas modified the milestones: 9.6.1, 9.6.2 May 7, 2020
@valadas valadas modified the milestones: 9.6.2, 9.7.0 Jun 25, 2020
@valadas valadas modified the milestones: 9.7.0, Future: Minor Jul 28, 2020
@valadas valadas added the help wanted Help Wanted label Oct 7, 2020
@WillStrohl
Copy link
Contributor

WillStrohl commented Oct 9, 2020

I'm running into a similar issue with a client, but with the social messaging. In our case, I think that the messages sent from the profiles are being identified as not containing HTML and incorrectly sending them as plain text, instead of e-mail. Is anyone else running into this?

https://github.com/dnnsoftware/Dnn.Platform/blob/develop/DNN%20Platform/Library/Services/Mail/Mail.cs#L62

The result of this is that the line breaks in the messages are being replaced by spaces instead of line breaks. (So this is related, but not.) :)

@WillStrohl
Copy link
Contributor

Example message text:

Hello!

What's up?

Is this on a new line, or what?
<br /><br /><br />
What about this one?
\n\n\n
And this one?

Result:
image

@WillStrohl
Copy link
Contributor

Yeah... This maybe should be a separate bug, I think...? 🤔

Example without HTML in it:

Geez!

Not everything was on a new line, huh? 

This try is without any HTML in it.

Result:
image

@sleupold
Copy link
Contributor

sleupold commented Oct 9, 2020

AFAIR, there is a very simply "IsHTML" check, looking for a "

" tag inside the message content or sth like this.

@WillStrohl
Copy link
Contributor

No... I dug into this more. It's more involved than that. I have a new issue created and most of the code written already.

#4166

@stale
Copy link

stale bot commented Jan 8, 2021

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

@stale stale bot added the stale label Jan 8, 2021
@stale
Copy link

stale bot commented Jan 23, 2021

This issue has been closed automatically due to inactivity (as mentioned 14 days ago). Feel free to re-open the issue if you believe it is still relevant.

@stale stale bot closed this as completed Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants