本文介绍了如何在Google App脚本中向多个收件人发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我无法通过Google脚本发送电子邮件以增加地址

I am unable to send email through google script to multiply addresses

尝试使用GmailApp.sendEmail,MailApp.SendEmail,var收件人= testmail + chemAmail;.

Tried with GmailApp.sendEmail,MailApp.SendEmail, var recipient = testmail + chemAmail ;.

  var testmail     = "[email protected]" ;
  var chemAmail    = "[email protected]" ;

  var body = "Hi,<br><br>" +
             "This is a Quality Alert.Please brief the required people and submit the Briefing Record EForm when it is completed." + "<br><br>" +
             "The details are stated below :<br>" +
             "Customer: " + customer + "<br>" +
             "Part Number: " + part + "<br>" +
             "S Number: " + s + "<br>" +
             "ID Number: " + id + "<br>" +
             "Defect : " + defect + "<br>" +
             "Description : " + desc + "<br>" +
             "Reject Photos : " + reject + "<br>" +
             "Okay Photos : " + ok + "<br><br>" +
             "Please complete it as soon as possible." + "<br><br>" +
             "Thanks." ;

    // Sends if chemA is ticked (Conditions for email to be sent)
    if(chemA == '✔')
    {
      var recipient = testmail , chemAmail;
      var subject = "Quality Alert for Chem A";
    }

GmailApp.sendEmail(recipient, subject, " ",{htmlBody: body});

我只能将其发送到testmail.我希望能够发送到多个电子邮件地址.

I can send it to testmail only. I want to be able to send to multiple email addresses.

推荐答案

09-08 01:53