Sponsored Content
Operating Systems HP-UX How to change font and colour in mail sent from Unix Post 302125929 by yogichavan on Monday 9th of July 2007 06:15:34 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
echo(3XCURSES)						  X/Open Curses Library Functions					    echo(3XCURSES)

NAME
echo, noecho - enable/disable terminal echo SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int echo(void); int noecho(void); DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially, curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft- ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined. RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5) SunOS 5.10 5 Jun 2002 echo(3XCURSES)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy