在Google AppMaker中发送电子邮件

时间:2018-05-22 07:44:14

标签: javascript gmail-api google-app-maker

单击时,按钮不会在服务器脚本上执行sendEmail(widget)。但它也没有显示任何错误。

function sendEmail(record) {  

  var to = record.OwnerEmail;

  var subject = 'Contract Renewal Notice';

  var body =  'Hello!<br/><p>Please be inform that your following contract is expiring soon:\n<br/>\n</p>'+
          '<b>Contract Name</b>'+'<?= record.Name ?><br/>'+
          '<b>Contract Value</b>'+'<?= record.Currency ?>'+' '+'<?= record.ContractValue ?><br/>'+
          '<b>Contract Owner</b>'+'<?= record.OwnerName ?><br/>'+
          '<b>Vendor Name</b>'+'<?= record.VendorName ?><br/>'+
          '<a href="<?= record.FileURL ?>">Open contract document</a></br>'+
          'Please act upon it. Thank You!';

  MailApp.sendEmail(to, subject, body);
}

我做得对吗?

0 个答案:

没有答案