I have this code to send emails with Google Apps Script:
var message = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua " + name + "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris" + receiver;
MailApp.sendEmail(email2Send, title, message);
But the email that goes to receiver has no formating, no paragraphs, etc. I would apreciate at least paragraphs (new lines) but \n doesn't work. The documentation tells me that:
htmlBody String if set, devices capable of rendering HTML will use it instead of the required body argument; you can add an optional inlineImages field in HTML body if you have inlined images for your email
So, I could do something like this:
...
var options = {
htmlBody: '<b><i>TEST</i></b>'
};
MailApp.sendEmail('someone@domain.ext', 'TEST', 'TEST', options);
...
What are the alternatives do add format to a message using MailApp.sendEmail
? Could you suggest me one simple HTML templates to a basic text format? (I'd like something simpler than this (Gmail) Sending emails from spreadsheet. How to add signature with image?)
Thanks in advance for any help!
\n
works.send a mail with the following body: