Send Email with Image/s in Mail Body Using GAS-2
Note: GmailApp - Respect cells formatting (line break but not bold text). MailApp - Don't respect cell formatting. It works better with HTML template. function SendEmailUsingGAS () { var subj = 'Test Email' ; var mailBody = 'Test Email' ; var img = DriveApp . getFileById ( '1fAalmjqjhjPpuDrcTBuHlt5NKCpe7Kvo' ). getAs ( 'image/png' ); var Emg ={ 'Logo' : img }; MailApp . sendEmail ({ to : 'ExcelSujeet@gmail.com' , subject : subj , htmlBody : mailBody + "<br><br>" + "<img src='cid:Logo' style='width:100px;height:100px'>" , inlineImages : Emg }); } URL's https://developers.google.com/apps-script/reference/mail/mail-app https://developers.google.com/apps-script/reference/mail/mail-app#sendemailrecipient,-subject,-body,-options Explanation This code is a Google Apps Script (GAS) function that sends an email using Gmail services and includes an inline image. Let...