How to send email using apps script google.
Note: nospam@example.cz change to your real email adress!
First email for test
You can use MailApp or GmailAppfunction Email1() {
MailApp.sendEmail('nospam@example.cz', "New Email", "Hello World");
}
function Email2() {
GmailApp.sendEmail('nospam@example.cz', "New Email 2", "Hello World");
}
Email - send html code
function EmailHtml1() {
var emailAddress = 'nospam@example.cz';
var folderURL = 'http://office.lasakovi.com';
var message = "<HTML><BODY>"
+ "<P>" + " My message."
+ '<P>The Web about Microsoft Office <A HREF="' + folderURL + '">here</A>. In Czech language.'
+ "</HTML></BODY>";
MailApp.sendEmail(emailAddress, "Test email Html", "", {htmlBody: message});
}
Žádné komentáře:
Okomentovat