![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| display HTML text in body using unix mailX ???? | sparan_peddu | UNIX for Advanced & Expert Users | 8 | 07-30-2008 02:23 AM |
| Send mail attachments and have a mail body | shibajighosh | AIX | 1 | 04-18-2008 02:54 PM |
| Mailx : can we have the body to be a binary file ? | CKIRCH | UNIX for Dummies Questions & Answers | 5 | 01-01-2008 07:33 PM |
| mailx: concatenating strings for message body (KSH) | rockysfr | Shell Programming and Scripting | 1 | 07-29-2007 09:12 AM |
| MAILX Body containing SQL results | dstinsman | UNIX for Dummies Questions & Answers | 2 | 10-06-2006 12:12 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
hi,
Can anyone please tell me how to add some text in the mail body like I can add subject using the following syntax. mailx -s "Hi - This is mail subject" xyz@abc.com Many Thanks. |
|
||||
|
This served the purpose but not completely...
Because I want to send an HTML message with attached file and it shoud have a body... I m trying the following code but its not working: uuencode ${CSV_FILE1} ${CSV_NAME1} | ( echo "From:${SENDER_ADDRESS}" echo "To: ${EMAIL_RECIPIENTS}" echo "MIME-Version: 1.0" echo "Content-Type: multipart/mixed;" echo ' boundary="PAA08673.1018277622/server.domain.com"' echo "Subject: Test Message" echo "" echo "This is a MIME-encapsulated message" echo "" echo "--PAA08673.1018277622/server.domain.com" echo "Content-Type: text/html" echo "" echo "<HTML> <BODY bgcolor=white> <blockquote><font color=black>Please find the attached report.</font> <font co lor=blue>Message by me</font> <font color=blue>Body</font></blockquote> </body> </html>" echo "--PAA08673.1018277622/server.domain.com" ) | mailx -t It only sends the html mail but without any attachment. |
|
||||
|
Joeyg, you can send both text and attachment with mailx..... but the problem arises when you use the html text, the attached file get distorted... like i m trying to send the mail using the following code: Code:
echo "mail body" > tempfile uuencode try.sh try.sh >> tempfile | mailx -s "Hi - This is mail subject" user@domain.com < tempfile Now if try the following code everything goes fine even in this case but the attachment contents get distorted and it can NOT be read (the attachment seems to get encoded).. Code:
( echo "MIME-Version: 1.0" echo "Content-Type: mutipart/mixed;" echo ' boundary="PAA08673.1018277622/server.domain.com"' echo "" echo "This is a MIME-encapsulated message" echo "" echo "--PAA08673.1018277622/server.domain.com" echo "Content-Type: text/html" echo "" echo "<HTML> <BODY bgcolor=red> <blockquote> <p><font color=black>Please find the attached report.</font></p><p> <font color=blue>Message by someone</font></p><p> <font color=blue>Body</font></p></blockquote> </body> </html>" echo "--PAA08673.1018277622/server.domain.com" ) > temp uuencode just.doc just.doc >> temp | mailx -s "Subject here" user@domain.com < temp Please solve this error! |
![]() |
| Bookmarks |
| Tags |
| mail, mail body, mailx, mailx attachment, sun solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|