urlfetch - Google apps script - UrlFetchApp to get image blob gets timeout error - Stack Overflow
Sat Feb 18 2023 15:56:07 GMT+0000 (Coordinated Universal Time)
Saved by
@jasonuk
var logoUrl = "https://my.site.com/path/to/logo.png"
var logoBlob = UrlFetchApp.fetch(logoUrl).getBlob().setName("logo");
...
MailApp.sendEmail({
to: client.email,
subject: "...",
htmlBody: // html with reference to image like this:
"<img src='cid:logo' width='107' height='160'/>"
,
inlineImages: {
logo: logoBlob,
}
});
content_copyCOPY
https://stackoverflow.com/questions/54732034/google-apps-script-urlfetchapp-to-get-image-blob-gets-timeout-error
Comments