超过3行电子邮件表单提交响应

时间:2012-09-05 20:49:23

标签: google-apps-script google-form

我见过很多表单电子邮件脚本,但最简单的只有3行NameEmailMessage

有没有办法可以为脚本添加更多内容以包含更多行?

1 个答案:

答案 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);