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});
}
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD0hHJ5qLZpnkEd5IGvHT95ovfHYYKUMXrfleX0ybqvQgTetSR0JW8hwfOESoAvTrAvY3cUIGkgArNVAeF7iBtxtnuALf3nVGjiGczrJgVYE0FSSQZv3FdNHrdyaRopjuAU4DCTdwfEFQ/s1600/email-2.jpg)
Žádné komentáře:
Okomentovat