Home › Forums › The libraries hosted on the site › EMailSender send email with attachments › EMailSender new Line Character in the message
- This topic has 4 replies, 1 voice, and was last updated 5 years, 1 month ago by
kamranrasul.
-
AuthorPosts
-
-
9 September 2020 at 15:01 #6204
kamranrasulHi Guys,
Indeed the EMailSender works perfectly. I was trying to send a message as 5-8 lines/ paragraph but the message received in Gmail doesn’t contain any new lines but only spaces.
Am I using them correctly? Please help!
-
9 September 2020 at 15:03 #6206
Hi kamranrasul,
with kind of character you use? \r \n??
You can also use HTML notation and you can obtain the same result with that.
Bye Renzo -
9 September 2020 at 15:04 #6207
kamranrasulThanks for the response Renzo!
I’m using both \n and \r.
I’m very new to esp32 and especially the email setup. Can you please shed some more detail on you suggestion?
I’ve tried ESP32_MailClient.h and it works fine with Arduino but when I try it with Visual Studio Code, PlatformIO, there are too many compilation errors in the library.
-
9 September 2020 at 15:09 #6209
I think that I undestand the problem.
In my library I try to give all the possibility, and as default the body of email si in HTML format, for example you can write a text like soEMailSender::EMailMessage message; message.subject = "Soggetto"; message.message = "<img src='http://mischianti.org/wp-content/uploads/2020/01/logo256.jpg'/><br><br>Ciao come stai<br>io bene.<br>Login set ok;<br>This is my link <a href='mischianti.org'>Mischianti's Blog</a>";the result is an email like thisbut if you want sent a simple email in TEXT format you must specify the correct mime type, so you must write an email like so
EMailSender::EMailMessage message; message.subject = "Soggetto"; message.message = "Ciao come stai\nio bene.\nLogin set ok;"; message.mime = MIME_TEXT_PLAIN;And in TEXT format line feed and carraige return work fine.
Give me a feedback, but I think the problem is this, you can try to use text line feed with HTML format.
Bye Renzo
-
9 September 2020 at 15:10 #6210
kamranrasulI will give it a try. And update you.
-
-
AuthorPosts
- You must be logged in to reply to this topic.
