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

web: make it possible to send HTML email #3058

Merged
merged 4 commits into from
May 13, 2019
Merged

web: make it possible to send HTML email #3058

merged 4 commits into from
May 13, 2019

Conversation

davidpanderson
Copy link
Contributor

No description provided.

}
if ($body_html) {
$body = "<html>\n";
$body .= '<body style="font-family:Verdana, Verdana, Geneva, sans-serif; font-size:12px;">\n';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to leave off the style tag on the body element? If a project is using HTML emails they are probably trying to replicate the styles they are using on their website and things like font and size may be something they want to control.

$body = $body_html;
$body .= "</body>\n";
$body .= "</html>\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the charset iso-8859-1, if a user has registered a username with Chinese characters, how will this be rendered on the email client?

@davidpanderson
Copy link
Contributor Author

I changed it to UTF-8

}
if ($body_html) {
$body = "<html><body>\n";
$body = $body_html;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to append to the string on this line. At the moment this overwrites from the previous line.

@TheAspens
Copy link
Member

Sorry for the delay in getting back to this. I found a small bug that needs fixing otherwise it should be good to merge.

@davidpanderson
Copy link
Contributor Author

Fixed; thanks!

@codecov
Copy link

codecov bot commented May 13, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@b098ea7). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3058   +/-   ##
=========================================
  Coverage          ?   10.13%           
=========================================
  Files             ?       39           
  Lines             ?     6266           
  Branches          ?        0           
=========================================
  Hits              ?      635           
  Misses            ?     5631           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b098ea7...83f7abd. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented May 13, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@b098ea7). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3058   +/-   ##
=========================================
  Coverage          ?   10.13%           
=========================================
  Files             ?       39           
  Lines             ?     6266           
  Branches          ?        0           
=========================================
  Hits              ?      635           
  Misses            ?     5631           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b098ea7...83f7abd. Read the comment docs.

@TheAspens
Copy link
Member

Looks fine - merging. Thanks for the change.

@TheAspens TheAspens merged commit 3670e7c into master May 13, 2019
@AenBleidd AenBleidd deleted the dpa_email branch May 21, 2019 20:58
@AenBleidd AenBleidd added this to the Server Release 1.2.0 milestone Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants