We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Need to change font color in email subject

Admin7267
Kilo Sage

Need to Display VIP in RED color in email subject, I have written the below email script but VIP is not showing in RED . 

 

 

var subject;

if (current.reported_for.vip) {
    subject = '<span style="color:red;">VIP</span>';
} else {
    subject = "";
}
email.setSubject(subject + ' IN: Assigned Incident# ' + current.number);

 

 

2 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron

Hi @Admin7267 

 

I think it is not possible, because we cant do Subject line in different colour in outlook too. 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

AshishKM
Kilo Patron

Hi @Admin7267 , 

The email subject line is string type, not supporting any HTML/CSS setting because the email application like outlook, gmail etc. has subject line as string type. The mail server, processing the subject as text only.

 

You can check in outloook, when cursor in subject line , all the HTML based icons readonly. 

AshishKMishra_0-1701966810453.png

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

2 REPLIES 2

Dr Atul G- LNG
Tera Patron

Hi @Admin7267 

 

I think it is not possible, because we cant do Subject line in different colour in outlook too. 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

AshishKM
Kilo Patron

Hi @Admin7267 , 

The email subject line is string type, not supporting any HTML/CSS setting because the email application like outlook, gmail etc. has subject line as string type. The mail server, processing the subject as text only.

 

You can check in outloook, when cursor in subject line , all the HTML based icons readonly. 

AshishKMishra_0-1701966810453.png

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution