我能够获取并通过电子邮件发送img2,但是当我尝试与所有人共享的图像时,以下内容失败,电子邮件仅显示一个空框。什么锣呢? TIA。
function sendEmail() {
// var img2 = "https://upload.wikimedia.org/wikipedia/commons/3/38/JPEG_example_JPG_RIP_001.jpg"
var img = "https://drive.google.com/open?id=19JSe5jLnlllnUoYZlimeWAC39qLXwWs-"
var subject = "Subject";
var msgBody = "Body";
var imgFetch = UrlFetchApp
.fetch(img2)
.getBlob()
.setName("imgFetch");
msgBody = "<img src='cid:thisImg' style='width:100px; height:70px;' />";
MailApp.sendEmail(mail, subject, "",
{ htmlBody: msgBody + "<BR/><BR/>",
inlineImages:
{
thisImg: imgFetch,
}
});
}
答案 0 :(得分:1)
此修改如何?在此修改中,对端点进行了修改。
var img = "https://drive.google.com/open?id=19JSe5jLnlllnUoYZlimeWAC39qLXwWs-"
var img = "https://drive.google.com/uc?id=19JSe5jLnlllnUoYZlimeWAC39qLXwWs-"