本文介绍了使用Google Apps脚本格式化正文电子邮件的替代方案(MailApp.sendEmail)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有这段代码可以使用Google Apps脚本发送电子邮件: 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 practitation ullamco laboris+ receiver; MailApp.sendEmail(email2Send,title,message); 但接收者的电子邮件中没有格式化,没有段落等。我会至少apreciate段落(新行)但\\ n不起作用。文档告诉我: $ b ,我可以这样做: ... var options = { htmlBody:' < b>< i> TEST< / i>< / b>'}; MailApp.sendEmail('[email protected]','TEST','TEST',options); ... 有什么方法可以使用 MailApp.sendEmail ?你能建议我一个简单的HTML模板为基本的文本格式? (我想比这更简单( Gmail)从电子表格发送电子邮件如何在图片中添加签名?) 感谢您的帮助! p> MailApp.sendEmail( [email protected], 测试, multi\\\line\\\text); 用以下内容发送邮件: 多重行文本 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: So, I could do something like this:...var options = { htmlBody: '<b><i>TEST</i></b>'};MailApp.sendEmail('[email protected]', '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.MailApp.sendEmail("[email protected]","test","multi\nline\ntext");send a mail with the following body:multi line text 这篇关于使用Google Apps脚本格式化正文电子邮件的替代方案(MailApp.sendEmail)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-22 20:33