How to change font and colour in mail sent from Unix


 
Thread Tools Search this Thread
Operating Systems HP-UX How to change font and colour in mail sent from Unix
# 1  
Old 07-09-2007
How to change font and colour in mail sent from Unix

Dear All,

We have following code to send mails from unix to users. We want to see few sentences of mail in bold font or to hightlight few lines in different colours. Could you please let me know how can we do it in function construct_body.

=======================================================
function process_maillist
{
MAILLIST=$DSPS_SAVE/mail_list.dat
PID=$$
construct_body > REGION${PID}.dat $1
echo $MAILLIST
for email in $(cat $DSPS_SAVE/mail_list.dat)
do
echo $email
mailx -s "$1 Files Not Refreshed" $email < REGION${PID}.dat
done
rm -f REGION${PID}.dat
}


function construct_body
{
echo "Dear All,\n"
echo "Due to technical issues, the files for the $1 market(s) were not refreshed into $ORASID during last nights batch pr
ocessing. The failure will affect the following information:\n"


echo "APPLICATION:"
echo " - Item/SKU Information: On-hand, demand-to-date, customer information, parameter changes."
echo " - Customer Orders"
echo " - In-transits"
echo " - Shipment history\n"
echo "BUSINESS OBJECTS:"
echo " - Business Objects Demand and Supply Reports.\n"
echo "SUPPLY CHAIN DATA WAREHOUSE:"
echo " - Reports and Report Writer Reports\n"
echo "EXCESS AND OBSOLETE (E&O) Website."

echo "The batch process continued despite the failure with the previous days data. Please note that the discrepancies and
act accordingly."

echo "\n $1 Technical team; please advice. \n\nThanks,\nDSP On-Call Support"
}

=======================================================
THANKS
# 2  
Old 07-09-2007
What you have is a plain text email. To do what you want you would need to send the email as HTML. However this then requires the email reader to support HTML.
# 3  
Old 07-09-2007
Thanks for reply.

Could you please let me know more about HTML reader?
# 4  
Old 07-09-2007
Quote:
Originally Posted by yogichavan
Could you please let me know more about HTML reader?
The HTML interpreter would be part of the clients email program, not part of the UNIX construction of the email. Do you know what email clients your target audience use?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send mail with font color change

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)
Discussion started by: sdosanjh
4 Replies

2. UNIX for Beginners Questions & Answers

Send mail with font change

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)
Discussion started by: sdosanjh
4 Replies

3. Shell Programming and Scripting

Sending mail from UNIX in courier font

Need assistance . I have a cvs file which i changed to html file but when i try to send mail to outlook its indent goes wrong. any idea is appreciated . below are some commands i tried using Converting csv to html #!/bin/sh nawk 'BEGIN{ FS="," print "MIME-Version: 1.0" print ... (7 Replies)
Discussion started by: ajayram_arya
7 Replies

4. Shell Programming and Scripting

sed colour change

Hi, I am trying to write a script which will email a backup report from the server, The contents of the email will be: ---------------------- ---- -- ---- ----- ---- ------- ---- ------- ------- | | | | |Chnge|Wkng| | | | | | ... (6 Replies)
Discussion started by: Bdoydie
6 Replies

5. Programming

Cshell help with change colour in print

i want to ask how to change the colour of prompt message from use? and also how to change colour in printing........ i want to change it as blue colour and red colour, but i found many website still don't know how to do. how's the command is wrote? thz really!! (1 Reply)
Discussion started by: wendy1089
1 Replies

6. Shell Programming and Scripting

Font change in unix while sending email

Hi, I know that we would be require HTML to change the font and color of the text of the output, if we wnt to send that through the email. But I have managed to get below code, can someone look into it and let me know if i can acheive my requirement through this kind of code: Following can... (9 Replies)
Discussion started by: amit.mathur08
9 Replies

7. UNIX for Advanced & Expert Users

To change the colour of the content in email sent through unix

Hi I want to change the color of the email content sent through unix. I tried a lot and left in vain. I heard that it could be done by sending the email as HTML. But I don't how to do it. Can you all share your ideas? ~sakthifire (1 Reply)
Discussion started by: sakthifire
1 Replies

8. Shell Programming and Scripting

ksh, font colour

hi all, how do i change the colour of text if i am using printf ?? in my script i am printing out response times from the server and i wanted to print out the max response time in red. ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

9. Shell Programming and Scripting

How to change the font colour in unix ?

Could you pls tell me how to change the font colour in unix ? What is the syntax ? (3 Replies)
Discussion started by: sars
3 Replies

10. UNIX for Dummies Questions & Answers

HOw to change the text colour through shell script?

Hi all, I have written one script. If i run the script, particular text in that script needs to be displayed in color.how this could be done?any commands r there to change the colour of the text while running the script? Ur help is appreciated !!! Thanx in Advance, Sona. (7 Replies)
Discussion started by: Sona
7 Replies
Login or Register to Ask a Question