Answer the question
In order to leave comments, you need to log in
How to send html email via script in tables?
There is already a script like this:
function sendSelectedEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var activeRange = sheet.getActiveRange();
var data = activeRange.getValues();
for (i in data) {
var row = data[i];
var emailAddress = row[0];
var subject = row[1];
var message = row[2];
MailApp.sendEmail(emailAddress, subject, message);
}
}
Answer the question
In order to leave comments, you need to log in
Specify the htmlBody
desired HTML content of the email as a parameter.
MailApp.sendEmail(emailAddress, subject, message, {
htmlBody: '<h1>Привет, Хабр!</h1>',
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question