【发布时间】:2018-11-14 02:58:23
【问题描述】:
我有一个发送自动电子邮件的 GAS 脚本,并希望包含几个表情符号。我试过使用简码和复制/粘贴,但到目前为止似乎没有任何效果。只是想看看有没有我遗漏的东西。
编辑:这是代码:
var title = rowData.publicationTitle;
var journal = rowData.journalTitle;
var url = rowData.publicationUrl;
//Emoji goes here in the body:
var body = "Hi " + firstName + "!<br><br>I noticed your article <a href='" + url + "'>“" + title + "”</a> was recently published in <i>" + journal + "</i>. Congratulations! This is just a friendly reminder to please upload your original document and a PDF version to our publications app when you have time.<br><br>To upload your publication, you can <a href='http://support.cpes.vt.edu/publishing'>click here</a>.<br><br>Thanks!<br><br>???? CB<br><br><hr style='background-color: #d8d8d8; border: 0 none; color: #d8d8d8; height: 1px;'><span style='font-size:12px'><b>CPES Publications Reminders</b> | <a href='mailto:leshutt@vt.edu' style='text-decoration:none'>Feedback</a> | <a href='http://support.cpes.vt.edu/publishing' style='text-decoration:none;'>Publication uploads</a></span>";
var emailSubject = "Just a reminder to upload your article!";
var me = Session.getActiveUser().getEmail();
var aliases = GmailApp.getAliases();
if (emailStatus == "Pending" && emailData !== "No emails found") {
GmailApp.sendEmail(email, emailSubject, body, {
from: aliases[2],
name: "CPES Bot",
htmlBody: body
});
}
我注意到发送星号(“⭐”)有效,但正常的笑脸(“????”)显示为黑白、Unicode 风格的图标以及我所拥有的所有其他内容试过的是问号。只能使用特定 Unicode 版本的表情符号吗?
【问题讨论】:
-
你能提供你使用的脚本吗?我认为它会帮助用户思考解决方案。
-
您的问题已经解决了吗?如果您仍在寻找解决方案,能否请您告诉我您目前的问题情况?如果您的问题已经解决,对不起。
-
嗨@Tanaike,不幸的是,我无法解决它。每当我将表情符号复制并粘贴到脚本中时,即使我在前后添加了一堆空格,它仍然会在电子邮件中显示为问号。 :\
-
感谢您的回复。我发布了我的答案。你能确认一下吗?
标签: email google-apps-script gmail emoji