Hi I am trying to send multiple images from my google drive via a script but the code does not seem to work. How can I achieve this?
function sendEmail() {
var Rainfall = DriveApp.getFilesByName('beach.jpg')
var High = DriveApp.getFilesByName('High.png')
MailApp.sendEmail({
to:"example@google.com",
subject: "Images for Social Media",
body:"Hi Joe, here are the images for Social Media",
attachments: [Rainfall.next(),High.next()]
})
}
See Question&Answers more detail:os