![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To send an email with the body content extracted from a file | rohit.shetty84 | UNIX for Dummies Questions & Answers | 3 | 05-11-2008 08:32 PM |
| Command line/Script to send E-mail with HTML body and binary attachment | G-Man | AIX | 3 | 04-18-2007 06:30 PM |
| AIX send mail with HTML message body and a binary attachment | G-Man | UNIX for Dummies Questions & Answers | 4 | 03-22-2007 10:15 AM |
| script that will send and email attachment | davels | Shell Programming and Scripting | 2 | 01-01-2005 01:44 AM |
| Send Mail with attachment and a body | manojram | How do I send email? | 4 | 04-26-2004 08:53 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
hi
plz help me in sending a mail with some data in body and an attachment as some txt file. currently i am able to send mail with some body content, i need an example how to send the same along with attachment. thanks in advance -bali |
| Forum Sponsor | ||
|
|
|
|||
|
Try this
(echo "$CONTENT \n"\ ; uuencode $ATTACH_OUTPUT_FILE $ATTACH_FILE_NAME)\ | mail -s "$SUBJECT" "$MAIL_ADD" Here CONTENT is the content of the file CONTENT="Hi All, PFA the file" ATTACH_OUTPUT_FILE is the file name along with path on disk ATTACH_OUTPUT_FILE="/tmp/records.dat" ATTACH_FILE_NAME is the file name you want to appear in the mail. ATTACH_FILE_NAME="Employee Records.txt" SUBJECT is subject of your mail MAIL_ADD is the mail address. |
|||
| Google UNIX.COM |