0
I am trying to change a snippet of HTML code to red, but the code below is not right. I thought that color="red" would work. Note: this is html embedded in javascript. When I remove the color snippet, ie color="red", the good wheel code.
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 reads data from a google sheet, and sends an alert to an email when the deadline expires. This alert needs to have a stretch in differentiated color, red q eh what I’m trying to do. Everything is working perfectly, except that the color never changes; it is always displayed in black. In the code below, I want the recipient to receive the following in red: "The basic purpose of the audit is to control deadlines. Be attentive to 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});
}
}
}
try with simple quotes color='red'
– Marlysson