function sendEmails(e){
var UserName = e.values[3];
var UserEmail = e.values[5];
var date = e.values[0];
var pin = e.values[4];
var subject = "[LFR] Application Succeed!";
var bodymessage = "Hi" + UserName + "for sending in your job application."
<br>
<br> + "The following is your Purchase Log Pin"
<br> + pin;
var emailsent = "Email Sent";
var isEmailsent = e.values[6];
if (isEmailsent ! = emailsent);
MailApp.sendEmail(UserEmail, subject, bodymessage);
}
&#13;
错误消息始终显示,&#34;非法形成的XML语法。 (第18行,文件&#34;代码&#34;)。有人请帮我解决一下!
答案 0 :(得分:0)
更改此
var bodymessage = "Hi" + UserName + "for sending in your job application."
<br>
<br> + "The following is your Purchase Log Pin"
<br> + pin;
到
var bodymessage = "Hi" + UserName + "for sending in your job application.<br> <br>The following is your Purchase Log Pin<br>" + pin;
基本上,你的字符串形式不正确
此外,
在if语句
之后删除;
if (isEmailsent ! = emailsent)
{
MailApp.sendEmail(UserEmail, subject, bodymessage);
}