【发布时间】:2021-08-14 21:36:28
【问题描述】:
如何使用 Google MailApp api 包含电子邮件标头信息?
我需要提供标题信息,例如 List-Unsubscribe: 或 List-Unsubscribe-Post:。
以下是 Google Apps 脚本的代码示例。似乎没有包含此类电子邮件标题信息的选项。
sendEmail(recipient, subject, body, options)
// Send an email with two attachments: a file from Google Drive (as a PDF) and an HTML file.
var file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
var blob = Utilities.newBlob('Insert any HTML content here', 'text/html',
'my_document.html');
MailApp.sendEmail('mike@example.com', 'Attachment example', 'Two files are attached.', {
name: 'Automatic Emailer Script',
attachments: [file.getAs(MimeType.PDF), blob]
});
【问题讨论】:
标签: google-apps-script gmail-api email-headers