attachment in file

Hi ,

I am planning to send one file as attachment thourgh script in unix
code is :

( cat body- /userdata/NEV/Scr/ee.txt; uuencode ee.txt) \
| mail -s "Email With Body Text and Attachment" ramesh.ss@gmail.com

it is not working .Please help me on this regards.

Thanks,
Raj

cat body-

what is body- ?

Hi

I removed BODY and i wrote like this ,still it is not working

`cat /userdata/NEW/Scr/ee.txt; uuencode ee.txt \ | mail -s "Email With Body Text andAttachment" "raju111.net@gmail.com"`

Try with this ..

uuencode /userdata/NEW/Scr/ee.txt ee.txt | mail -s "Email With Body Text andAttachment" raju111.net@gmail.com

Please say what Operating System and version you are using. I assume that becuse you are using "mail -s" not "mailx -s" that this is not unix?

You will probably need to convert the attachment from unix to MSDOS format before running the uuencode. Do you have the "ux2dos" or "unix2dos" utility program?
Also, please show where the email body is coming from, and the full path name to the attachment).

The important think in the design of the script is to ensure that all the output ends up on the pipeline where the mail command can read it.

(cat email_body.txt ; ux2dos /userdata/NEV/Scr/ee.txt | uuencode ee_att.txt ) | \
     "Email With Body Text and Attachment" "raju111.net@gmail.com"

Also, lose the backticks on the command line. They are not required or desirable.