Finally got my hands to Google App Script editor.
This variant defenitly worked and send me email with two attacments
function sendEmail() {
var Rainfall = DriveApp.getFilesByName('Untitled document')
var Rainfall2 = DriveApp.getFilesByName('128x128_tl_icon.png')
MailApp.sendEmail({
to:"mymail@gmail.com",
subject: "Images for Social Media",
body:"Hi Joe, here are the images for Social Media",
attachments: [Rainfall.next(), Rainfall2.next()]
})
}
sendEmail()
Just make sure that files 'Untitled document' and '128x128_tl_icon.png' exists on your Google Drive. It think this is your problem
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…