How to send message in html format using shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to send message in html format using shell script
# 1  
Old 02-06-2010
How to send message in html format using shell script

I want to send email message in html format using unix shell script. I use sendEmail command in my script to send email message. The syntaxt of the sendEmail command is as follows:
$sendEmail -f <email> -t <email> -u $subject -s smtpserverSmilieort -o message-file=html

I should be able to rediret the output of script in HTML formatted file
OR How do I create HTML file using Shell Script.

Thanks and Regards
# 2  
Old 02-06-2010
You may want to copy a given html file into the message body:

Code:
sendEmail [blabla] -m "$( cat html.file )" [blabla]

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Unable to send attachment with html tables in UNIX shell script

Heyy, any help would be grateful.... LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies

2. UNIX and Linux Applications

Ssmtp -t < /path/to/the/message.txt (How to format message.txt for html email)

ssmtp has been running well under Kubuntu 12.04.1 for plain text messages. I would like to send html messages with ssmtp -t < /path/to/the/message.txt, but I cannot seem to get the message.txt file properly formatted. I have tried various charsets, Content-Transfer-Encoding, rearranging the... (0 Replies)
Discussion started by: Ronald B
0 Replies

3. Shell Programming and Scripting

how to send html email from shell script

This is my below script which is working fine as it send only plain text email. So My question is- How can I modify my below script to send this as an HTML formatted email? I want to show the text color of this expression `(echo "100*$TEST2/$TEST1" | bc -l)` as `RED` in an email and that can be... (3 Replies)
Discussion started by: raihan26
3 Replies

4. Shell Programming and Scripting

urgent: Not able to send the html formatted message from mailx

<html> <body style=background-color:AliceBlue> <p>Hi,<pre>please check the connectivity status of the server. <pre> And find the server log file for more details. </p> <h1><font size="4">SERVER <font color="red">111.111.11.1</font> IS NOT AVAILABLE IN ONLINE</font></h1> <font color="red"... (5 Replies)
Discussion started by: jothi basu
5 Replies

5. UNIX for Advanced & Expert Users

How to send email as HTML format with attachment ?

hi.. Could somebody help me how to sent an attachment using sendmail command and the content is HTML format ?. Below is my code to sent the email as HTML but i do not know how to sent the attachment, please help me To: "BAHARIN HASAN"<baharin.hasan@gmail.com> from: "DATAONE SDN... (4 Replies)
Discussion started by: bh_hensem
4 Replies

6. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

7. Shell Programming and Scripting

shell send html email

I know how to send an email with sendmail in a shell script. I know how to send an email with an attachment in a script. But im trying to send an email and need to set Content-Type to text/html and insert a file as the body and not attachment. Send email with file as attachment: ... (4 Replies)
Discussion started by: Ikon
4 Replies

8. UNIX for Dummies Questions & Answers

AIX send mail with HTML message body and a binary attachment

I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies

9. UNIX for Advanced & Expert Users

send a message through email to 5 people using unix script.

Hi All, I want to send a message through email to 5 people in unix script. Please let me know, how to do it.Please do reply it is urgent. Thanks, Mary. (3 Replies)
Discussion started by: MARY76
3 Replies

10. Shell Programming and Scripting

send a message through email to 5 people using unix script?

Hi All, I want to send a message through email to 5 people in unix script. Please let me know, how to do it.Please do reply it is urgent.How to do it?Please reply.thanks! Thanks, Mary. (2 Replies)
Discussion started by: MARY76
2 Replies
Login or Register to Ask a Question