如何在尝试向Google Apps应用程序脚本中的多个收件人发送电子邮件时解决无效的电子邮件错误

时间:2016-12-20 11:31:00

标签: javascript email

I am unable to understand why I am getting invalid Email when I am trying to send emails to multiple recipients ...column 5 in my sheet contains the list of all recipients .  

  for(var i=0;i<data.length;i++){//data contains the sheet data 
         // the last row which has to be updated 
        var lastUpdatedRow = updateSheet.getLastRow()+1;
        var row = data[i];
        var deviceModel = row[0];
        var OS = row[1];
        var name = row[4];
        var recipientsTO = row[5];  
        var location = row[6]
          MailApp.sendEmail(recipientsTO,subject, message, { htmlBody: html}); 

row [5] - 包含所有邮件地址 能够在行[5]中发送单个收件人但无法读取下一个可用的收件人地址

0 个答案:

没有答案