我关注了Gmail markup for apps script quickstart。如果邮件是由应用程序脚本MailApp服务发送的,则标记按钮在Gmail UI上可见。但是,如果我更改为GmailApp.sendEmail(),该按钮就会消失。
如何通过使用GmailApp使标记邮件工作相同?为什么他们的行为有所不同?
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Network.
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting /etc/rc.d/rc.local Compatibility...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Postfix Mail Transport Agent...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Dynamic System Tuning Daemon...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting PostgreSQL database server...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting
The Apache HTTP Server...
为了保持相同的格式,我将其移至sendEmail(收件人,主题,正文,选项)功能,该功能仍然有效。
function testSchemas(){
var htmlBody = getHTML(...);
MailApp.sendEmail({
to: Session.getActiveUser().getEmail(),
subject: 'Test Email markup - ' + new Date(),
htmlBody: htmlBody,
});
}
然后迁移到GmailApp服务: 邮件发送时没有标记按钮。
function testSchemas2(){
var htmlBody = getHTML(...);
MailApp.sendEmail(Session.getActiveUser().getEmail(),
'Test Email markup (by MailApp)- ' + new Date(),
"",
{
htmlBody: htmlBody
});
}