Closed aaronkaplan closed 4 years ago
Sorry Aaron, I missed that issue. By default, we are sending HTML mail.
So a quick fix will be to do body = "\n<br>".join(body.split("\n"))
.
I am planning to add the possibility to send the e-mail in text/plain format too without doubt. But I'm stuck at this decision. There are four possibilities to send the e-mail:
<br>
or <p
is in the text → text/html, else text/plainWhat should be the default behaviour in the next release, 3. or 4.? I'd vote for 3. because that's the way I would expect envelope to work as a developer. ... But there are articles on the net saying it's a good thing to always present a text alternative for your html text.
I've implemented 3. for the while.
Try adding .mime("plain")
to your envelope object to preserve all the formatting. For the instant, I left "html" as the default and only line breaks are converted automatically <br>
if forgotten.
Hi!
I think it makes sense to give the user an option. Similar to most mail clients, they also allow the user to select which format should be used by default. I recommend to set text/plain as the default format.
Best, a.
On 15.01.2020, at 18:23, Edvard Rejthar notifications@github.com wrote:
Sorry Aaron, I missed that issue. By default, we are sending HTML mail.
So a quick fix will be to do body = "\n
".join(body.split("\n")) . I am planning to add the possibility to send the e-mail in text/plain format too without doubt. But I'm stuck at this decision. There are four possibilities to send the e-mail:• text/html (current default) • text/plain • autodetect if
or <p is in the text → text/html, else text/plain • same as 3. + when text/html is used, add text/plain as an alternative What should be the default behaviour in the next release, 3. or 4.? I'd vote for 3. because that's the way I would expect envelope to work as a developer. ... But there are articles on the net saying it's a good thing to always present a text alternative for your html text.— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
You are right. User that writes down plaintext would expect text/plain. Now, user has the control over the mime with the mime function + by default .mime("auto")
there is a detection whether the message is in HTML. If so, the message has "text/html" but if not, message keeps text/plain.
I am trying to send a mail this way:
and then send it like this:
But the long body with line breaks gets put into one single line. How to fix this?