2
votes

No breaks my wooden-shoe (is a saying in the Netherlands) which means, now i go crazy:

I have a google script where "\n" is not working with MailApp.sendEmail. In an other script i used \n too with the MailApp.sendEmail and there it is working! I already tried GmailApp.sendEmail, same problem.

1
Probably because you're using htmlBody instead of plain text body parameter. On HTML line breaks are ignored by design. - Henrique G. Abreu
YES! Thank you. i did not notice the htmlbody paramater because it is code i copied from an example. - Pjotr
@HenriqueAbreu answer it below :) - Zig Mandel
I usually don't write single-line answers. Specially a "guess" one, since there's no code in the question. But due to the amount of votes it got, I guess I'll follow your recommendation @Zig - Henrique G. Abreu

1 Answers

1
votes

Probably because you're using htmlBody instead of plain text body parameter. In HTML line-breaks are ignored by design.