Closed kamranrasul closed 4 years ago
Hi kamranrasul,
with kind of character you use? \r \n??
You can also use HTML notation, and with
you can obtain the result.
Bye Renzo
Thanks 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.
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 so
EMailSender::EMailMessage message;
message.subject = "Soggetto";
message.message = "<img src='https://www.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='www.mischianti.org'>Mischianti's Blog</a>";
and you receive an email like so
but 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
I will give it a try. And update you.
Hi 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!