1.

Solve : How to send email attachments using Unix.?

Answer»

I have a script that sends multiple files as attachments. When the user receives the email, the attachments are showing but when they try to open any attachment the file is empty... Any ideas?

here is the script.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 cd $DATAFILES
 files=`ls -1 `



for i in $files
   do
      echo "--NEXT_PART_1_1036183299_109_16707"       >> $EMAIL_FILE
      echo "Content-Type: text/plain; charset=iso-8859-1" >> $EMAIL_FILE
      echo "Content-Disposition: attachment; filename=\"$i\"" >> $EMAIL_FILE
      echo " "                                        >> $EMAIL_FILE
      echo " "                                        >> $EMAIL_FILE
      
      cat $i                                          >> $EMAIL_FILE
      echo "."                                        >> $EMAIL_FILE
done

echo "--NEXT_PART_1_1036183299_109_16707"                       >> $EMAIL_FILE
echo "Content-Type: text/plain; charset=iso-8859-1"             >> $EMAIL_FILE
echo "Content-Disposition: attachment; filename=\"endofemails\"" >> $EMAIL_FILE
echo "."                                                        >> $EMAIL_FILE

#### S: is the drive assigned to handle email
 
cp $EMAIL_FILE s: Quote from: Jkeri on November 04, 2011, 12:35:12 PM

cp $EMAIL_FILE s:

UNIX has no concept of an S: drive.  Where are you trying to copy this file?According to my system architect guy, the email server for this type of application is configured on the server S: drive...    Quote from: Jkeri on November 16, 2011, 08:08:31 AM
According to my system architect guy, the email server for this type of application is configured on the server S: drive...

As Rob notes, though, *nix doesn't use drive letters. Quote from: Jkeri on November 16, 2011, 08:08:31 AM
According to my system architect guy, the email server for this type of application is configured on the server S: drive...   

Possibly you need to use Samba to ACCESS the S: drive on a different server?


Discussion

No Comment Found