i receive an error on mailappsendemail when the email list is in an array

Issues / Explanation:

  • email_list_S1 is an array with emails, but the first argument of sendEmail accepts a string of email/s.

  • You need to convert email_list_S1 to string and you can use Array.prototype.toString() to accomplish that.


Solution:

Replace:

MailApp.sendEmail(email_list_S1,..)

with

MailApp.sendEmail(email_list_S1.toString(),..)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top