Operating System - HP-UX
1836444 Members
2544 Online
110100 Solutions
New Discussion

Re: Sending a file as an attachment with email from command prompt

 
GN_1
Occasional Contributor

Sending a file as an attachment with email from command prompt

Could any one help me by providing a way to send a file as attachment ( not part of the body of letter) with an email?

I dont see any options with mail or mailx. Any command line utilities or free email client software can do that? I need to send a file after PGP encryption.

Thanks in advance.
5 REPLIES 5
Sanjay_6
Honored Contributor

Re: Sending a file as an attachment with email from command prompt

Hi,

Look at the bottom of this page. Take a not of the top read solutions,

http://forums.itrc.hp.com/cm/FamilyHome/0,11864,117,00.html

Here is the link to the solution,

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x41950559ff7cd4118fef0090279cd0f9,00.html

Hope this helps.

Regds
Amruth
Regular Advisor

Re: Sending a file as an attachment with email from command prompt

Hi,

I will use like this ...

#uuencode myfile myfile|mailx -m -s "hi" test@yahoo.com

or simply

#mailx test@hotmail.com
Good day,
AR
If i am doing the same way you are doing to me then what is the difference between us.
harry d brown jr
Honored Contributor

Re: Sending a file as an attachment with email from command prompt

This allows you to attach many files as text files:

for i in `echo filename1 filename2 filename3 ...`
do
uuencode $i $i.txt
done|mailx -m -s "test" username@whereever.com


or for a single file

uuencode filename filename.txt | mailx -m -s "subjectgoeshere" username@whereever.com


live free or die
harry
Live Free or Die
GN_1
Occasional Contributor

Re: Sending a file as an attachment with email from command prompt


coOL!

The 'uuencode' works!
Thanks a lot to all for the help.

-Narayan
Justo Exposito
Esteemed Contributor

Re: Sending a file as an attachment with email from command prompt

Hi,

There are an external utility called mpack, you can found at:
ftp://ftp.andrew.cmu.edu/pub/mpack

Regards,

Justo.
Help is a Beatiful word