HTML + Nail Command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting HTML + Nail Command
# 1  
Old 04-10-2013
Wrench HTML + Nail Command

Hello all

I am trying to send an email to my Outlook from a Solaris 10 machine using a Nail command. The email is of HTML type but when I receive it in outlook, its in simple text format showing HTML tags as shown below:

Command I am using:

Code:
cat body.lst | /opt/nail-11.25/bin/nail -r support@wael.com -b my@email.com -s "`cat mail.lst`"

The result is:

Code:
Win 1000 SMS Free   
Message-ID: <5164e3dc.8ij3zwPZvA4wZJ5k%support@wael.com>
User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Dear Customer,<br><br>Recharge Rs. 100 now get an instant bonus of 1000 SMS for free.<br><br>test<br><a href = "#"><img src = "http://www.wael.com/images/fb_logo.png"></a><a href = "#"><img 
src = "http://www.wael.com/images/twitter_logo.png"></a><a href = "#"><img src = "http://www.wael.com/images/youtube_logo.png"></a>


How can I modify the command so that I receive it in HTML format ?
If nail command dosent work , how can I use mailx command to achieve the same ?
# 2  
Old 04-10-2013
Set Content-Type to html:
Code:
Content-Type: text/html; charset=us-ascii

# 3  
Old 04-11-2013
Where do I change it ?
The only input I am giving is :

Code:
cat body.lst | /opt/nail-11.25/bin/nail -r support@wael.com -b my@email.com -s "`cat mail.lst`"

# 4  
Old 04-11-2013
If you are not setting the MIME headers anywhere in your input file, then I guess nail is considering content type as plain text by default.

I suggest you to define MIME headers in your input file and use -t option with nail to use these headers.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Nail command error

Hello all. I am currently using Red Hat Enterprise Linux Server release 5.8 (Tikanga). I have multiple users on this system and intend to use nail command to send out emails. When I enter the command: nail <some-email-address> its accepts the command and sends out an email. But when I... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

2. Shell Programming and Scripting

Shell command output into HTML

Hi unix geeks out there, I have a file that contains the output of a command in text format ------------------------------------------------------------------------ r201535 | kashyapgiri@gmail.com| 2012-06-21 05:00:01 +0530 (Thu, 21 Jun 2012) | 1 line Changed paths: M... (8 Replies)
Discussion started by: Kashyap
8 Replies

3. UNIX for Dummies Questions & Answers

problem with character @ inside username to use pop3 with nail

Hi: I am trying to read mails using pop3 protocol with the nail client. I have configurated the following files: .mailrc set NAIL_EXTRA_RC=~/.nailrc .nailrc shortcut myisp pop3://developers@afinformatica.com@mail.afinformatica.com set... (2 Replies)
Discussion started by: chemi
2 Replies

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

5. Shell Programming and Scripting

nail set header

Hi all. I am kind a new in Linux, so please forgive me if some statements will be dumb. So for some unknown reason server I am working on is using nail command instead of mail and mailx. I have googled around and fined out that it is possible to set mail header using command mail and option -a.... (0 Replies)
Discussion started by: rvaitkus
0 Replies

6. UNIX for Dummies Questions & Answers

How to send multiple attachment through "nail" command

Hi, I using the "nail" command to send an attachement,the command is : nail -s TEST -a $param/Result.html xyz@yahoo.com </dev/null but now my requirement is changed, I have to send two attachments,through the same mail.. :rolleyes: I have tried this: nail -s TEST -a $param/*.html... (1 Reply)
Discussion started by: Amey Joshi
1 Replies
Login or Register to Ask a Question