Neel
Neel

Reputation: 459

Html Mail using Apps Script

Is it possible to create & send Html Mails using GAS? The current MailApp class currently only allows string plaintext body and any html code written there displays the html source rather than rendering the content.

Upvotes: 0

Views: 4042

Answers (1)

Serge insas
Serge insas

Reputation: 46794

The documentation is quite explicit, you can define html body as an optional parameter like this for example :

function test(){
  MailApp.sendEmail('[email protected]', 'subject :test HTML body','text Body', {htmlBody:"This is a html body test<br><br> in html format"})
}

Upvotes: 3

Related Questions