Email via Google Apps Script from another email address

后端 未结 3 1085
小蘑菇
小蘑菇 2021-02-06 02:58

I\'m familiar with how to send emails via Google Apps Script (http://code.google.com/googleapps/appsscript/articles/sending_emails.html). It\'s super cool. But is there a way I

3条回答
  •  北海茫月
    2021-02-06 03:21

    Try this

    var alias=GmailApp.getAliases();//This gets array of Aliases set up in gmail.
    GmailApp.sendEmail(email , "Subj.. ", "body....", {from: alias[0]}); //Uses first alias
    

提交回复
热议问题