[Problems facing]
If I put a "blank" immediately after entering "\n (line feed)" in the body, the "blank" becomes two.
[Script]
function sendEmail() {
MailApp.sendEmail({
to: "test@example.com",
subject: "Test",
body: "───────────────\n Hello, world!", //<-1 blank
});
}
[Result]
───────────────
Hello, world! <-2 blanks at the beginning
[What I tried]
function sendEmail() {
MailApp.sendEmail({
to: "test@example.com",
subject: "Test",
body: "───────────────\n Hello, world!",
});
}
[Result]
───────────────
Hello, world! <-displayed as is
[want to achieve]
I'm asking for one blank display.
You may try Unicode escape sequence with the required whitespace character in unicode(For eg, 200A
(hair space) or 2009
(thin space)):
body: "───────────────\n\u{00A0}Hello, world!"