![]() |
|
|
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 |
| Why no attachment seen??? | Amruta Pitkar | UNIX for Dummies Questions & Answers | 2 | 04-27-2009 06:22 PM |
| mail with attachment | param786 | Shell Programming and Scripting | 1 | 07-15-2007 12:20 PM |
| attachment using sendmail | vastare | SUN Solaris | 4 | 01-03-2006 12:56 PM |
| Mailing an attachment | gayath3 | UNIX for Dummies Questions & Answers | 4 | 03-21-2005 01:02 AM |
| Mailing an attachment | gayath3 | Shell Programming and Scripting | 0 | 03-18-2005 06:09 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
sendmail attachment
I need to send an email with an attached .pdf file. I am able to send the attcahed file using uuencode as follows (script1) :
ATTFILE=/home/user/test.pdf ATTNAME=test.pdf MAILTO=my.receiver@xxx.com MAILFROM=my.sender@xxx.com uuencode $ATTFILE $ATTNAME | sendmail -v f${MAILFROM} ${MAILTO} This code delivers the attached file correctly to my.receiver@xxx.com, however it ends up in Spam mail with : From: my.sender@xxx.com To: Cc: Subject: Attachments : test.pdf This is doing everything I need, except putting my.receiver@xxx.com in the To: line of the email, which apparently is causing it to end up as SPAM, yet the email does end up at my.receiver@xxx.com's email. Go figure ? SO the I tried the following (script2) : ATTFILE=/home/user/test.pdf ATTNAME=test.pdf MAILTO=my.receiver@xxx.com MAILFROM=my.sender@xxx.com TEMPFILE=tempmail.txt echo"From:${MAILFROM}\nTo:{MAILTO}\nCc:\nSubject:\n" > TEMPFILE uuencode ${ATTFILE} ${ATTNAME} | sendmail -t -oi < ${TEMPFILE} This puts all of the information in the email address lines, and delivers the mail to my.receiver@xxx.com's inbox, but no attachement : From: my.sender@xxx.com To: my.receiver@xxx.com Cc: Subject: Attachments : I need to force the To: line in script1, or make the attachment work in script2. Any Ideas ? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|