How to change the color inside email using shell script?

hi,

i want to send an email from unix using mailx command.

mailx -s "subject" "email@abc.com" < email.txt

Email.txt contains some file names that are transferred successfully and some that failed. so the files that got failed to tranfer, should be displayed in red color in the mail. is it possible?? i used tput command but it doesnt work and changes the color only in the terminal. is there any other way?

You can make email.txt to contain html formatting with required colors.

refer Sending HTML Email through mailx

2 Likes