Reputation: 61
I have this script:
function EmailQuote() { var message = { to: "[email protected]", subject: "Quote", body: "Hi, Please find attached quote", //name: "", attachments: [SpreadsheetApp.getActiveSpreadsheet().getAs(MimeType.PDF).setName("Quote")] } MailApp.sendEmail(message); }
to send an email of the sheet as a pdf.
I would like it to send the email to the address in cell B13 instead of to [email protected].
Can anyone help with how to do this please?
Many Thanks
Upvotes: 0
Views: 53
Reputation: 10084
Change "[email protected]" with SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getRange("B13").getValue()
Upvotes: 1