I'm trying to send out an email from google spreadsheets with multiple options:
if I type first attachments and then htlmBody in the code, like below, the email goes out with the correct body content and structure but the two attachments don't appear
MailApp.sendEmail(recipient, subject,{attachments:[blob,blob1]} ,{htmlBody:html});
While if I type first htmlBody and then attachments in the code, like below, the email goes out with the body "[object Object]" but the two attachments are present!
MailApp.sendEmail(recipient, subject ,{htmlBody:html},{attachments:[blob,blob1]});
What am I doing wrong? Why I can't use both? And in the case i would need to add a "cc" option?
I already tried with only one attachment and the result is the same!