I'm trying to change a snippet of HTML code to red, but the code below does not work. I thought the color="red" would work. Note: this is html embedded in javascript. When I remove the excerpt from the color, that is, color="red", the code runs fine.
var message = "RECOMENDAÇÃO DE AUDITORIA: " + dataRange[i][3]
+ "<P> -------------------------------------------------</P>"
+ "<P> *Esta é a Proposta de encaminhamento da Crefiska, de " + dataEnvio + "\n" + ", que deve ser respondida até " + dataFim + ". Para esclarecimentos, consulta o manual e falar com o auditor " + dataRange[i][1]
+"<HTML><BODY><i><font size=1 color="red"> A finalidade básica da medidas cabíveis (Portaria PRESI 1144/2015, de 02 de Dezembro de 2015) </font></i></A>"
+ "</BODY></HTML>";
I have a javascript code that le dice a google spreadsheet, and sends an alert 'to an email when the deadline expires. This alert needs to have an excerpt in different color, red what I'm trying to do. Everything is working perfectly except that the color never changes; always appears in black. In the code below, I want the recipient to receive the following red excerpt: "The basic purpose of the audit is to track deadlines. Be aware of them." He is receiving, but receives black. The complete code is this:
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 0; // First row of data to process
var numRows = sheet.getLastRow();
var lastCol = sheet.getLastColumn();
var dataRange = sheet.getRange(2, 1, numRows-startRow,lastCol).getValues(); //Get all values except the header rows
for (var i=0;i<numRows-startRow;i++){
var expire = dataRange[i][8];
if (expire < 10) {
var emailAddress = dataRange[i][7];
var subject = "Você tem um prazo de auditoria vencendo em " + dataRange[i][8] + " dias";
//var teste = Utilities.formatDate(dataRange[i][1], "GMT", "dd/MM/yyyy");
var dataEnvio = Utilities.formatDate(dataRange[i][0], "GMT", "dd/MM/yyyy");
var dataFim = Utilities.formatDate(dataRange[i][4], "GMT", "dd/MM/yyyy");
var message = "RECOMENDAÇÃO DE AUDITORIA: " + dataRange[i][3]
+ "<P> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------</P>"
+ "<P> *Esta é a Proposta de encaminhamento de " + dataEnvio + "\n" + ", que deve ser respondida até " + dataFim + ". Para esclarecimentos, consulta o manual de auditoria e monitoramento, disponível aqui; entrar em contato com a SESF, pelo telefone 123456 e falar com o auditor " + dataRange[i][1]
+"<HTML><BODY><i><font size=1> A finalidade básica da auditoria é controlar prazos. Esteja atento a eles. </font></i></A>"
+ "</BODY></HTML>";
MailApp.sendEmail(emailAddress, subject, "", {htmlBody: message});
}
}
}