With Google Apps Script, how to make a line break in a variable to send mail?
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- Script fails on SpreadsheetApp.openById - Requires
- Split Lines and Bold Text within a ui.alert Window
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- How can my Google Apps Script be run by others the
- How to stop execution of Google Apps Script?
- Profiling the Performance of a Google App Script
- String starts with in Google Script
You should use the
<br>
tag when sending the HTML portion of the email .Below is a sample on how I compose the same email body, but formatted differently for HTML & plain text. (Not the best code but hopefully it illustrates the point)
If you're not sending an HTML formatted message, use "\n". I personally despise HTML formatted e-mail.
Newline in
msgBox
:Please note you need to escape '\n' with additional backslash.
I usually use table in my mail but I think
<br />
should work