Skip to content

Instantly share code, notes, and snippets.

View ayuthmang's full-sized avatar
😊
Hope you have a great year

Ayuth Mangmesap ayuthmang

😊
Hope you have a great year
View GitHub Profile
@ayuthmang
ayuthmang / T-Shirt confirmation - example.gs
Last active August 11, 2017 06:30
Send emails using Google Script part 2
var subject_skeleton = "อีเมล์ยืนยันสำหรับสั่งซื้อเสื้อออนไลน์";
var content_skeleton = "สวัสดีครับคุณ %s \n" +
"\n"+
"คุณได้ทำการสั่งไซส์เสื้อไว้เป็นไซส์ %s\n" +
"หากไม่ใช่ไซส์คุณสามารถติดต่อกลับได้ที่\n" +
"099-999-9999 หรืออีเมล์ [email protected]\n" +
"\n" +
"ขอขอบพระคุณที่ไว้วางใจเรา";
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
@ayuthmang
ayuthmang / example.gs
Last active August 11, 2017 05:55
Send emails using Google Script part 1
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 2; // Number of rows to process
// Fetch the range of cells A2:B3
var dataRange = sheet.getRange(startRow, 1, numRows, 2)
// Fetch values for each row in the Range.
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
@ayuthmang
ayuthmang / T-Shirt confirmation - example.gs
Last active August 11, 2017 05:27
Send emails using Google Script
var subject_skeletion = "อีเมล์ยืนยันสำหรับสั่งซื้อเสื้อออนไลน์";
var content_skeleton = "สวัสดีครับคุณ %s \n" +
"\n"+
"คุณได้ทำการสั่งไซส์เสื้อไว้เป็นไซส์ %s" +
"หากไม่ใช่ไซส์คุณสามารถติดต่อกลับได้ที่" +
"099-999-9999 หรืออีเมล์ [email protected]" +
"\n" +
"ขอขอบพระคุณที่ไว้วางใจเรา";
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();