![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mailx commannd - Mail and Attachment in same mail | sharif | UNIX for Advanced & Expert Users | 6 | 03-19-2008 04:25 PM |
| mail with attachment | param786 | Shell Programming and Scripting | 1 | 07-15-2007 12:20 PM |
| How To Add Attachment to Mail | lesstjm | Shell Programming and Scripting | 3 | 12-06-2005 11:24 AM |
| mail attachment | sushrut | UNIX for Dummies Questions & Answers | 3 | 08-28-2001 03:14 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Mail with File attachment
I have a requirement that I would have to write a shell script for sending a mail. The logic is that script should send a mail with a file attachment. I know that I could use 'uuencode' for the attachment but It just displaying the file content in the mail but I just need to attach the file in the mail and send it to a Email id (Just like our normal mail attachment). Could you please let me know how I can proceed? Thanks in advance.
Cheers, Thambi |
|
||||
|
Eg:
SUBJ="Send mail from Unix with file attachments" TO=someone@domain_name CC=someoneelse_1@domain_name,someoneelse_2@domain_name ( cat << ! To : ${TO} Subject : ${SUBJ} Cc : ${CC} ! cat << ! uuencode ${file_1} ${file_1} uuencode ${file_2} ${file_2} uuencode ${file_3} ${file_3} ! ) | sendmail -v ${TO} ${CC} |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|