|
|||||||||
| UNIX for Advanced & Expert Users 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. |
unix and linux operating commands |
| Tags |
| sendmail |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
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 |
| Sponsored Links | ||
|
|
|
#3
|
||||
|
||||
|
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
|
||||
|
||||
|
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. |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
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). |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
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) | ||
| Sponsored Links | |
|
|
#7
|
||||
|
||||
|
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 |
| Sponsored Links | ||
|
|
![]() |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 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 | 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 |
| Unable to send e-mail using mailx command | manas6 | UNIX for Dummies Questions & Answers | 1 | 01-22-2009 04:53 AM |
|
|