I need to send a reminder message to certain email recipients, I have the following structure
function recordatorio () {
var asunto = "Recordatorio de felicitación";
var nombrebuzon = "Comunicación Global Engineering Mexico";
var me = Session.getActiveUser().getEmail();
var Mensaje = "Buen día:<br><p>Les recuerdo que el día <b>" + (day+1) + " de "+ nameMonth +"</b> será el cumpleaños de <b>" + rNames + "</b>,"+
" por lo que sugerimos una felicitación personal.<p>"+
"<br>Para reforzar esta iniciativa <b>Comunicacion Global Engineering Mexico</b> le enviará al festejado(a) una postal de cumpleaños con la firma de la dirección.<br><br>Atentamente<br>"+
"<b>Comunicación Global Engineering Mexico<br>Strategy & Control</b>"+
"<br>";
Logger.log("Procesando recordatorio de Felicitacion para: " + remminderMailChief);
GmailApp.sendEmail(remminderMailChief,asunto, "", {htmlBody: Mensaje, name: nombrebuzon, from: me});
Utilities.sleep(1000);
}
Where: "rNames" is an arrangement or list with names separated by commas
[Carlos Alberto Ortiz , Miguel Flores García]
"remminderMailChief" is an arrangement or list of emails separated by commas
[[email protected], [email protected]]
What I want to do is send an email to [email protected] changing it in the Message rName="Carlos Alberto Ortiz" and likewise send an email to the second email [email protected] changing it in the Message rName=" Miguel Flores García "
How do I send them independently? I mean that the email arrives at [email protected] but with the name of "Carlos Alberto Ortiz" and the second email the other name.