Add color to part of the text in a mail sent from unix script
Hi,
We are using KSH.
I was able to write a script where a mail is sent to the concerned persons and this is working perfectly file. I need to give a different color to a part of the data in the mail which. The script written is as follows;
In the above script the part "cat $TMPFILE" is to be in a different color like blue or red. Please let me know how i could achieve this. I did go through other threads but was not very clear and not able to do it.
Please help and thanks in advance.
Create an email like the one you want to send using outlook or thunderbird, etc and send it to your unix system.
Retrieve the email from /usr/spool/mail/recipient (using vi) and use that file as a template for modifying $TMPFILE.
You will see that there are multiple sections in the file, a plain text portion, and an html portion.
White space is important, if there are blank lines near the boundary lines, and the "Content-type" lines, these must be retained.
If the recipient is reading the email using a unix telnet session, then you can use the appropriate terminal escape sequences to change the color.
If the email is being read by a MS Windows email client, then you have to create the email using html tags to change color.
An alternative may be to create a pdf file, and email it as an attachment.
If the recipient is reading the email using a unix telnet session, then you can use the appropriate terminal escape sequences to change the color.
If the email is being read by a MS Windows email client, then you have to create the email using html tags to change color.
An alternative may be to create a pdf file, and email it as an attachment.
Hi All,
I have a file that contains following entries.
I want to highlight the line that has word as "FAILURE" while sending the email.
File
------------------------------------------------------------
Job Name: ABC
Start Time: 07/20/2019 07:32:39
End Time: 07/20/2019... (4 Replies)
Hello,
Somebody can help me to develop a script for the below requirement
I have a 3 files in a directory which was dynamically changed everyday basis. I need a script to fetch the 1pattern of strings in each file. if the three matching pattern is same send a mail with subject as success else... (1 Reply)
Hi,
I need to extract part of a text to two variables
text is
"PL/SQL procedure successfully completed. ERROR ----------------------------------------------------------------- Test Error Message PLUSVAR ---------- 1"
I want "Test Error Message" in one variable and "1" in another variable.... (11 Replies)
I want to color the text and bold the text and mail these text.
input:
hi..(in bold)
good morning (in blue color)
and mail these as in color and bold
:wall: (1 Reply)
Hi Gurus,
I'm a total newbie to Perl and Awk scripting. Let me explain the scenario, there is a DB2 table with 5 columns and one of the column is a CLOB datatype containing XML. We need all the 4 columns but only a portion of string from the XML column.
We decided to export DB2 table to a .del... (26 Replies)
Hi,
The following command i executed
mailx -s "hi" abc@yahoo.com<<EOF
`echo "^[[31mWelcome"`
EOF
I don't any color (RED) in my mail.
Please assist me?
Os is SunOs 5.8
Thanks. (1 Reply)