GScript-Mailer/RegisSpreadsheet.gs

273 lines
12 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function getData(namasheet) {
var data = SpreadsheetApp.getActive().getSheetByName(namasheet).getDataRange().getValues();
return data;
}
function SaveLogData(){
const data = SpreadsheetApp.getActive().getSheetByName("kirimkonfirm");
var email = data.getRange('kirimkonfirm!J2').getValue();
var time = Date("now");
//console.log(email)
data.appendRow([time,"Berhasil",email]);
}
function kirimdata(){
var getdata = getData("kirimkonfirm");
var firstname = getdata[1][1];
var lastname = getdata[1][2];
var gelar = getdata[1][3];
var tipe = getdata[1][6];
var email =getdata[1][9];
//ADD Log data to excel
SaveLogData();
var signature = Gmail.Users.Settings.SendAs.list("me").sendAs.filter((account) => {
if(account.isDefault){
return true}
})[0].signature;
MailApp.sendEmail({
name: "ICMP",
to: email,
subject: "Your registration for The 1st ICMP is verified",
htmlBody: `<!DOCTYPE html>
<html lang="en" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title></title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch><o:AllowPNG/></o:OfficeDocumentSettings></xml><![endif]-->
<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css"/>
<!--<![endif]-->
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
}
a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: inherit !important;
}
#MessageViewBody a {
color: inherit;
text-decoration: none;
}
p {
line-height: inherit
}
.desktop_hide,
.desktop_hide table {
mso-hide: all;
display: none;
max-height: 0px;
overflow: hidden;
}
@media (max-width:620px) {
.desktop_hide table.icons-inner {
display: inline-block !important;
}
.icons-inner {
text-align: center;
}
.icons-inner td {
margin: 0 auto;
}
.image_block img.big,
.row-content {
width: 100% !important;
}
.mobile_hide {
display: none;
}
.stack .column {
width: 100%;
display: block;
}
.mobile_hide {
min-height: 0;
max-height: 0;
max-width: 0;
overflow: hidden;
font-size: 0px;
}
.desktop_hide,
.desktop_hide table {
display: table !important;
max-height: none !important;
}
.row-1 .column-1 .block-4.heading_block h1 {
font-size: 24px !important;
}
}
</style>
</head>
<body style="background-color: transparent; margin: 0; padding: 0; -webkit-text-size-adjust: none; text-size-adjust: none;">
<table border="0" cellpadding="0" cellspacing="0" class="nl-container" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: transparent;" width="100%">
<tbody>
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tbody>
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f9f9f9; color: #000000; width: 600px;" width="600">
<tbody>
<tr>
<td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-left: 10px; padding-right: 10px; vertical-align: top; padding-top: 5px; padding-bottom: 20px; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%">
<table border="0" cellpadding="0" cellspacing="0" class="image_block block-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tr>
<td class="pad" style="width:100%;padding-right:0px;padding-left:0px;padding-top:60px;">
<div align="center" class="alignment" style="line-height:10px"><img class="big" src="https://icmp.farmasi.unej.ac.id/wp-content/uploads/sites/3/2022/08/kop_icmp_2022_png-1-1.webp" style="display: block; height: auto; border: 0; width: 580px; max-width: 100%;" width="580"/></div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="divider_block block-3" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tr>
<td class="pad" style="padding-bottom:20px;padding-left:10px;padding-right:10px;padding-top:20px;">
<div align="center" class="alignment">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="20%">
<tr>
<td class="divider_inner" style="font-size: 1px; line-height: 1px; border-top: 3px solid #295D09;"><span></span></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="heading_block block-4" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tr>
<td class="pad" style="text-align:center;width:100%;">
<h1 style="margin: 0; color: #023b5c; direction: ltr; font-family: 'Lato', Tahoma, Verdana, Segoe, sans-serif; font-size: 28px; font-weight: 700; letter-spacing: normal; line-height: 120%; text-align: center; margin-top: 0; margin-bottom: 0;"><span class="tinyMce-placeholder">Your registration for The 1<sup>st</sup> ICMP is verified</span></h1>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="divider_block block-6" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tr>
<td class="pad" style="padding-bottom:35px;padding-left:10px;padding-right:10px;padding-top:30px;">
<div align="center" class="alignment">
</div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="paragraph_block block-7" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%">
<tr>
<td class="pad">
<div style="color:#023b5c;direction:ltr;font-family:'Lato', Tahoma, Verdana, Segoe, sans-serif;font-size:16px;font-weight:400;letter-spacing:0px;line-height:120%;text-align:left;mso-line-height-alt:19.2px;">
<p style="margin: 0; margin-bottom: 16px;"><strong>Dear ${gelar} ${firstname} ${lastname}</strong></p>
<p style="margin: 0; margin-bottom: 16px;">Congratulation! <br> You have already verified and registered as ${tipe} at The 1st International Conference on Medicinal Plants (The 1st ICMP) which will be held on October 21st- 22nd, 2022 in virtual platform.</p>
<p style="margin: 0; margin-bottom: 16px;">Please submit your abstract no later than 1st October 2022. <a href="https://icmp.farmasi.unej.ac.id/abstract-guideline/">Guidelines and template for abstract</a> can be found on the conference website.</p>
<p style="margin: 0; margin-bottom: 16px;">Abstract submission link address <a href="https://forms.gle/h7n8XCbuLfvLNJg89">https://forms.gle/h7n8XCbuLfvLNJg89</a></p>
<p style="margin: 0; margin-bottom: 16px;">If the link above is unclickable, please copy the link and paste it to your browser's address bar. You will receive a notification of abstract submission confirmation in your provided email.</p>
<p style="margin: 0; margin-bottom: 16px;">Details of the conference schedule will be provided in the conference website. Please book your calendar to join this conference. Zoom link will be sent 2 days before the conference in your provided email.</p>
<p style="margin: 0; margin-bottom: 16px;">Should you have further inquiries, please feel free to contact us via email at <a href="mailto:icmp@unej.ac.id" style="text-decoration: underline; color: #8a3b8f;" target="_self" title="icmp@unej.ac.id">icmp@unej.ac.id</a> or <a href="https://icmp.farmasi.unej.ac.id/contact-us/" rel="noopener" style="text-decoration: underline; color: #8a3b8f;" target="_blank">contact person(Click here)</a></p>
<p style="margin: 0; margin-bottom: 16px;"> </p>
<p style="margin: 0; margin-bottom: 16px;">Greetings,</p>
<p style="margin: 0; margin-bottom: 16px;">Chairman,</p>
<p style="margin: 0; margin-bottom: 16px;"> </p>
<p style="margin: 0;">apt. Endah Puspitasari, M.Sc.</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-position: center top;" width="100%">
<tbody>
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #fff7fb; color: #000000; width: 600px;" width="600">
<tbody>
<tr>
<td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; background-color: #fcfcfc; border-bottom: 0px solid #D4F9EF; border-left: 0px solid #D4F9EF; border-right: 0px solid #D4F9EF; border-top: 0px solid #D4F9EF; padding-left: 25px; padding-right: 25px; vertical-align: top; padding-top: 45px; padding-bottom: 25px;" width="100%">
<table border="0" cellpadding="10" cellspacing="0" class="text_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%">
<tr>
<td class="pad">
<div style="font-family: sans-serif">
<div class="txtTinyMce-wrapper" style="font-size: 12px; mso-line-height-alt: 14.399999999999999px; color: #66787f; line-height: 1.2; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif;">
<p style="margin: 0; font-size: 14px; text-align: center;">Copyright © 2022 . International Conference of Medicinal Plants</p>
</div>
</div>
</td>
</tr>
</table>
<table border="0" cellpadding="10" cellspacing="0" class="text_block block-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%">
<tr>
<td class="pad">
<div style="font-family: sans-serif">
<div class="txtTinyMce-wrapper" style="font-size: 12px; mso-line-height-alt: 14.399999999999999px; color: #66787f; line-height: 1.2; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif;">
<p style="margin: 0; font-size: 14px; text-align: center;"><a href="https://icmp.farmasi.unej.ac.id/contact-us/" rel="noopener" style="text-decoration: underline; color: #0068a5;" target="_blank">Contact Us</a>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-3" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tbody>
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #000000; width: 600px;" width="600">
<tbody>
<tr>
<td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; vertical-align: top; padding-top: 5px; padding-bottom: 5px; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%">
<table border="0" cellpadding="0" cellspacing="0" class="icons_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tr>
<td class="pad" style="vertical-align: middle; color: #9d9d9d; font-family: inherit; font-size: 15px; padding-bottom: 5px; padding-top: 5px; text-align: center;">
<table cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%">
<tr>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table><!-- End -->
</body>
</html>`,
});
}