我见过很多表单电子邮件脚本,但最简单的只有3行Name
,Email
和Message
。
有没有办法可以为脚本添加更多内容以包含更多行?
答案 0 :(得分:1)
您应该look here获取所有可以执行的示例,但是如果您正在寻找使用分段符号布局电子邮件的方法。这是一种显示更复杂的消息体的方法:
var body = "Dear User,";
body += "\n\nWe have received your Email.";
body += "\n\nWe need samples of your work (scripts, portfolio, photos, DVDs) to complete your file.";
body += "\n\nPlease either mail or email your samples to us. Our contact information is below.";
body += "\n\nPlease do not hesitate to contact us if you have any further questions.";
body += "\n\nThank you,";
\n\n
是两次返回的方式。您也可以使用\n
只返回一次。
您可以使用以下其他高级参数:
var ccList = "me@me.com";
var mailReplyTo = "me@me.com";
var emailName = "ME!";
var optAdvancedArgs = {replyTo:mailReplyTo, bcc:ccList, name:emailName};
MailApp.sendEmail(userEmail, subject, body, optAdvancedArgs);