In This article, we see how to send Google Docs as an email attachment
- Add a new Spreadsheet
- Click on The tool menu icon
- then click on script editor
These are some basic steps to send google docs in email
- Add a new function
function sendEmailToClient()
{
}
function sendEmailToClient() { var result = SpreadsheetApp.getUi().alert("Are you sure, you want to send email?", SpreadsheetApp.getUi().ButtonSet.OK_CANCEL); if(result === SpreadsheetApp.getUi().Button.OK) { var message = { to:'[email protected]', subject: "Payment Details Summary", body: "Hi team,\n\nPease refer the attached PDF's and please take a initiate to settle down the pending payments if any thing is pending..\n\nThank you,\n Shiv Kumar", name: "Shiv Kumar", attachments: [SpreadsheetApp.getActiveSpreadsheet().getAs(MimeType.PDF).setName("Summary Report")] } } MailApp.sendEmail(message); }
Recent Comments