How to send html email using appscript in hindi
दोस्तों आज किस आर्टिकल में मैं आपको बताऊंगा कि आप किस तरीके से (How to send html email using appscript in hindi) गूगल शीट में Appscript का इस्तेमाल करके HTML ईमेल भेज सकते हैं |
Download Sheet For Practice
Code.js File
function getEmailTemplateData() {
let sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Bill");
let purchaseOrder= sheet.getRange("C6").getValue();
let billDate= sheet.getRange("J6").getDisplayValue();
let cname= sheet.getRange("A8").getValue();
let add1= sheet.getRange("A9").getValue();
let add2= sheet.getRange("A10").getValue();
let add3= sheet.getRange("A11").getValue();
let gst= sheet.getRange("H8").getValue();
let contactPerson= sheet.getRange("H9").getValue();
let pno= sheet.getRange("H10").getValue();
let email= sheet.getRange("H11").getValue();
let lastrow= sheet.getRange("A13").getDataRegion().getLastRow();
let billingArea = sheet.getRange("A14:K"+lastrow).getDisplayValues();
let totalAmt =sheet.getRange("K22").getValue();
let htmlService= HtmlService.createTemplateFromFile("index")
htmlService.pOrder=purchaseOrder
htmlService.bdate=billDate
htmlService.compName=cname
htmlService.add1=add1
htmlService.add2=add2
htmlService.add3=add3
htmlService.gst=gst
htmlService.conPerson=contactPerson
htmlService.phonenumber=pno
htmlService.email=email
htmlService.tAmt=totalAmt
htmlService.billingArea=billingArea
let htmlTemp= htmlService.evaluate().getContent()
MailApp.sendEmail(email,"Today is your bill","Please find attachment",{htmlBody:htmlTemp})
}
function include(filename){
return HtmlService.createHtmlOutputFromFile(filename).getContent()
}
Style Sheet
0 टिप्पणियाँ
Thanks For Message Me if any issue please feel free to contact