I'm creating a script with Google Script to perform a multiple email send with personalized text inside the email body (like name and addresses). Is it possible to send the emails with an imported account (in GMail) via script?
Thanks
You can use send method of GmailApp:
https://developers.google.com/apps-script/reference/gmail/gmail-app#sendemailrecipient-subject-body
sendEmail(recipient, subject, body)
Sends an email message. The size of the email (including headers) may not exceed 20KB.
// The code below will send an email with the current date an time
var now = new Date();
GmailApp.sendEmail("[email protected]", "current time", "The time is: " + now.toString());
Also, GmailApp.sendEmail support send from your alias as well.
sendEmail(recipient, subject, body, options)
support use options to set options.from = '[email protected]'
, as document saying:
from: String, the address that the email should be sent from, which must be one of the values returned by getAliases()
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加