[英]Google Scripts: send email with GMail imported account
我正在使用Google Script創建一個腳本,以在電子郵件正文中執行包含個性化文本(例如名稱和地址)的多封電子郵件發送。 是否可以通過腳本使用導入的帳戶(在GMail中)發送電子郵件?
謝謝
您可以使用GmailApp的發送方法:
https://developers.google.com/apps-script/reference/gmail/gmail-app#sendemailrecipient-subject-body
sendEmail(收件人,主題,正文)
發送電子郵件。 電子郵件的大小(包括標題)不得超過20KB。
// The code below will send an email with the current date an time
var now = new Date();
GmailApp.sendEmail("mikemike@gmail.com", "current time", "The time is: " + now.toString());
另外,GmailApp.sendEmail支持也從您的別名發送。
sendEmail(recipient, subject, body, options)
支持使用選項來設置options.from = 'alias@domain.com'
,如文檔所述:
from:字符串,應該發送電子郵件的地址,該地址必須是getAliases()返回的值之一
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.