unable to sent mail in html format by mailx command.

Tags
advanced, sendmail

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 06-08-2004
Question unable to sent mail in html format by mailx command.

I use maix command to sent mails.
i can sent only plain text mails.

Unable to sent mails in html format.
while sending mails in html format, the received mail has the html code only.
# 2  
Old 06-08-2004
I think that you will have to use sendmail instead of mailx to send inline html, e.g....
Code:
#!/usr/bin/ksh

export MAILTO="spam@ebay.com"
export CONTENT="filename.html"
export SUBJECT="Subject"
(
 echo "Subject: $SUBJECT"
 echo "MIME-Version: 1.0"
 echo "Content-Type: text/html"
 echo "Content-Disposition: inline"
 cat $CONTENT
) | /usr/sbin/sendmail $MAILTO

# 3  
Old 06-08-2004
thankx

it worked with sendmail..

when i tried the similiar way in mailx by

( echo "Content-Type: text/html"; cat <<filename.htm>>; ) | mailx -s 'xx' xx@x.com

it give the html source code insists of html formatted file.

Is that not possible to convert sendmail to maix ...?



In sendmail the from address can be change, but in mailx the from address remains the user login address, I need to do with mailx only.
# 4  
Old 06-08-2004
The mailx utility is a front-end for sendmail.

It is not possible to use mailx to send inline html, but you can attach html documents.
# 5  
Old 06-10-2004
Fine.

After sending the mail by SendMail,

when i saw the mail, the From address was there.
But the To Address is not there at the receipt end.

How to get the to address in the maix box and also the cc(if any).
# 6  
Old 06-10-2004
You should look at the manual pages for sendmail. I have only included the bare minimum to get you started. You can add headers like "To:", "Cc:", "Bcc:", "Apparently-To:", etc. This can be done manually or via the -O options, e.g. -O "NoRecipientAction=add-to"
This User Gave Thanks to Ygor For This Post:
parpaa (09-11-2013)
# 7  
Old 05-09-2006
Hi All,

With sendmail command i am able to send HTML page as a body of mail but not able to attach PDF file as an attachment in the same mail...

Could u pls help me resolving this problem ....

Pls see the code which i am using ....

Rgds,
Nilesh

mailfrom="abcd@emirates.com"
mailto="xyz@emirates.com"
content="XXEGAR_EK_SOA_Email.htm"
subject="EK SOA with send mail"
attachment="/trident1/applprod/erpprodcomn/feeders/ar_statement/out/DDP008_300905.zip"
cd /trident1/applprod/erpprodappl/xxegfin/11.5.0/bin
(echo "From: $mailfrom"
#echo "To: $mailto"
echo "subject: $subject"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat /trident1/applprod/erpprodappl/xxegfin/11.5.0/bin/$content)> ./file1
uuencode $attachment $attachment|sendmail $mailto < ./file1
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unable to attach a .txt file or .log file to mail and mailx command Samah Shell Programming and Scripting 5 04-27-2017 03:49 PM
Unable to send mail with 'mail' command tcnm UNIX for Advanced & Expert Users 3 01-09-2016 06:39 PM
Unable to send attachment using mailx command nkarthik_mnnit UNIX for Dummies Questions & Answers 3 12-04-2014 01:46 PM
Not able to send the mail using mail and mailx command scriptscript Shell Programming and Scripting 2 01-21-2013 08:26 AM
Mailx command - send mail as table format qwertyu Shell Programming and Scripting 2 11-29-2012 12:37 PM
Unable to send mail through mailx Srinathkiru Solaris 0 04-17-2012 11:29 PM
Unable to send mail with inline html along with attachment. Please help! thulasidharan2k Shell Programming and Scripting 1 05-27-2011 09:19 AM
How would i mail in html format?(Formatting Help) pinga123 UNIX for Dummies Questions & Answers 7 04-15-2011 11:21 AM
How would i mail in html format?(Formatting Help) pinga123 UNIX for Dummies Questions & Answers 0 04-14-2011 05:59 AM
How to embed a html file in a mail sending from Linux box with uuencode or mailx? johnveslin Shell Programming and Scripting 2 09-27-2010 07:16 PM
sending mail through mailx command mani_isha Shell Programming and Scripting 3 05-10-2010 07:51 AM
Carbon copy for a mail in mailx command miltony Shell Programming and Scripting 11 05-15-2009 03:26 AM
Unable to send e-mail using mailx command manas6 UNIX for Dummies Questions & Answers 1 01-22-2009 04:53 AM
sending mail using mailx command manas6 UNIX for Dummies Questions & Answers 5 12-08-2008 10:20 AM
How to use mail,mailx command in Shell Script ? sollin Shell Programming and Scripting 16 04-28-2006 07:50 AM
All times are GMT -4. The time now is 10:24 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?