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
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&family=Titillium+Web:ital@1&display=swap'); * { padding: 0; margin: 0; box-sizing: border-box; } form main { max-width: 820px; min-height: 700px; margin: 10px auto; border: 1px solid black; background-color:#0fbcf9 ; } #header { text-align: center; text-decoration: underline; color: white; font-size: 25px; text-shadow: 1px 1px 2px black; font-family: 'Roboto', sans-serif; } #subhead { text-align: center; color: #ffa801; margin: 10px 0; text-shadow: 1px 1px 2px black; font-family: 'Titillium Web', sans-serif; } #mypara { font-size: 10px; font-weight: bold; text-align: center; margin-bottom: 5px; } .purchase { text-align: center; color: #2c3e50; text-decoration: underline; margin-bottom: 10px; text-shadow: 1px 1px 1px 2px white; } .purchaseBill { display: flex; justify-content: space-around; margin-left: 10px; } .billno { display: flex; } .mydate { display: flex; } #orderNo1 { font-weight: bold; } #orderno { margin-left: 10px; } #orderdt { font-weight: bold; } .orderdate { margin: 0 10px; } .section { display: flex; justify-content: space-between; } .companyInfo { padding: 10px; width: 50%; border-right: 1px solid black; font-weight: bold; } .companyid { padding: 10px; width: 50%; } .gstlabel, .contlabel, .phonelabel, .emaillabel { font-weight: bold; } #gst, #contperson, #mob, #email { margin-left: 20px; float: right; } #formdata thead tr th { padding: 10px; border: 1px solid black; background-color: chocolate; color: white; } tbody tr td { text-align: center; padding: 10px; border: 1px solid black; background-color: rgb(123, 131, 204); color: white; } .disclaimer { margin: 10px; font-size: 15px; } tfoot tr td { border: 1px solid red; text-align: center; font-weight: bold; font-size: 25px; } .data2 { font-weight: bold; margin: 10px 15px; } .data1 { margin: 10px 15px; }
0 टिप्पणियाँ
Thanks For Message Me if any issue please feel free to contact