I heard that I can use HTML for this, but since I have almost 0 knowledge about HTML I came here. I want to insert a clickable link instead of a plain text in my Google script. Is there a way to convert “+link+” into a clickable link in the mail?
//Logger.log(data);
var link;
var birthdate;
var emailAddress;
var today = new Date();
var rowNum=2;
for (var i in data) {
var row = data[i];
link = row[4];
birthdate = row[2];
emailAddress = row[6];
Logger.log(" i = "+i);
/*
Logger.log("today.getDay() "+today.getDate()+" today.getMonth() "+today.getMonth()+"n");
Logger.log("birthdate.getDay() "+birthdate.getDate()+" birthdate.getMonth() "+birthdate.getMonth()+"n");
*/
Logger.log("link "+link+" email "+emailAddress+" birthdate "+birthdate);
if((today.getDate()==birthdate.getDate()) && (today.getMonth()==birthdate.getMonth())){
Logger.log("link "+link+" email "+emailAddress+" birthdate "+birthdate);
var body = "Hallo Support,nn"+
"folgender Sender wurde zum Geburtstag gratuliert:n"+
""+link+"";
var subject = 'Geburtstagsbenachrichtungsmail';
if(emailAddress!=null){
MailApp.sendEmail(emailAddress, subject, body);
sheet.getRange(rowNum, 8,1,1).setValue("Gesendet am "+new Date());
}
}
rowNum++;
}
}
So far I Googled for solutions and ended up here, since I don’t know much about HTML
1