Commit fa043468 authored by Steffen Michels's avatar Steffen Michels

use UTF-8 encoding for HTML mails

parent 0d7961ea
Pipeline #31411 passed with stage
in 6 minutes and 36 seconds
......@@ -24,7 +24,7 @@ sendEmail :: ![EmailOpt] !String ![String] !String !String -> Task ()
* @param Sender: The sender address
* @param Recipients: The recipient addresses
* @param Subject: The subject line of the e-mail message
* @param Body: The HTML body of the e-mail message
* @param Body: The HTML body of the e-mail message. Text has to be UTF-8 encoded.
*/
sendHtmlEmail :: ![EmailOpt] !String ![String] !String !HtmlTag -> Task ()
......
......@@ -52,7 +52,8 @@ where
sendHtmlEmail :: ![EmailOpt] !String ![String] !String !HtmlTag -> Task ()
sendHtmlEmail opts sender recipients subject body =
sendEmail [EmailOptExtraHeaders [("content-type", "text/html")]: opts] sender recipients subject htmlString
sendEmail
[EmailOptExtraHeaders [("content-type", "text/html; charset=UTF8")]: opts] sender recipients subject htmlString
where
// avoid too long lines (SMTP allows a max length of 1000 characters only)
// by inserting a newline (\r\n is required for mails) after each tag
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment