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

mail plugin question #462

Closed
incmve opened this issue Jan 12, 2015 · 10 comments
Closed

mail plugin question #462

incmve opened this issue Jan 12, 2015 · 10 comments

Comments

@incmve
Copy link
Contributor

incmve commented Jan 12, 2015

Hey Guys,

Any one know how to send multiple lines instead of a single line with the mail plugin?
I tried \n but the mail is still a single line.

@demlak
Copy link

demlak commented Mar 23, 2015

i was also playing much with linebreaks.. but in textmode it seems to impossible..
you have to use html mode, if you want to have linebreaks

@mwittig
Copy link
Collaborator

mwittig commented Sep 21, 2015

@demlak The mail plugin now supports HTML text. This way a message body with multi-line text can be created. Most e-mail clients support HTML text these days.

@sweetpi I think this issue ticket can be closed.

@demlak
Copy link

demlak commented Sep 21, 2015

I would prefer multiline Text Mail
HTML Mails Produce more traffic and are not that good automatic readable by scripts/progs

@mwittig
Copy link
Collaborator

mwittig commented Sep 21, 2015

Unfortunately, this does not seem to be possible with the nodemailer package used as part of pimatic-mail. The author appears to believe it is not a nodemailer issue but a problem with the MTA. I tend to disagree on that as I have tested with various MTAs. See https://github.com/andris9/Nodemailer/issues/41

@sweetpi
Copy link
Contributor

sweetpi commented Sep 21, 2015

I don't see the problem. If the string contains new lines, then these should be in the email, or? Some mail clients need two new lines to render it as one new line.

@mwittig
Copy link
Collaborator

mwittig commented Sep 21, 2015

Unfortunately not. I have tried the following:
text:"Just\n\na test" --> Just\n\na test
text:"Just\r\na test" --> Just\r\na test
text:"Just\r\na test" --> Justrna test

@sweetpi
Copy link
Contributor

sweetpi commented Sep 21, 2015

With pimatic v0.8.83 "\n" should now be parsed as new line :)

@mwittig
Copy link
Collaborator

mwittig commented Sep 21, 2015

Wow, that's great! Works fine for me! Thanks for sorting this!

text:"Hi\neverybody" -->
Hi
everybody

@sweetpi sweetpi closed this as completed Sep 22, 2015
@incmve
Copy link
Contributor Author

incmve commented Sep 22, 2015

👍

@mwittig
Copy link
Collaborator

mwittig commented Oct 13, 2015

Actually, this has changed with pimatic v0.8.87 and rules parsing may bail out with an syntax. The backslash need to be escaped now in the configuration file!

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

4 participants