👤
Home Man
Search
Today's Posts
Register

Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

unable to sent mail in html format by mailx command.

Tags
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"
The Following User Says Thank You to Ygor For This Useful 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

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:49 PM
Unable to send attachment using mailx command nkarthik_mnnit UNIX for Dummies Questions & Answers 3 12-04-2014 12:46 PM
Not able to send the mail using mail and mailx command scriptscript Shell Programming and Scripting 2 01-21-2013 07:26 AM
Mailx command - send mail as table format qwertyu Shell Programming and Scripting 2 11-29-2012 11:37 AM
Unable to send mail through mailx Srinathkiru Solaris 0 04-17-2012 10:29 PM
Unable to send mail with inline html along with attachment. Please help! thulasidharan2k Shell Programming and Scripting 1 05-27-2011 08:19 AM
How would i mail in html format?(Formatting Help) pinga123 UNIX for Dummies Questions & Answers 7 04-15-2011 10:21 AM
How would i mail in html format?(Formatting Help) pinga123 UNIX for Dummies Questions & Answers 0 04-14-2011 04: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 06:16 PM
Unable to send e-mail using mailx command manas6 UNIX for Dummies Questions & Answers 1 01-22-2009 03:53 AM


All times are GMT -4. The time now is 10:41 AM.

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





Not a Forum Member?
Forgot Password?