Operating System - HP-UX
1830931 Members
2387 Online
110017 Solutions
New Discussion

How to attach a file in mailx

 
Steven Ma
New Member

How to attach a file in mailx

Hi,

just wondering how to attach a file with a specific name in mailx.

I tried:
uuencode somefile.txt | mailx -s "test" someone@hotmail.com

and

cat somefile.txt | uuencode somefile.txt | mailx -s "test" someone@hotmail.com

None of these worked.

Thanks.

4 REPLIES 4
harry d brown jr
Honored Contributor

Re: How to attach a file in mailx

James R. Ferguson
Acclaimed Contributor

Re: How to attach a file in mailx

Steven Ma
New Member

Re: How to attach a file in mailx

Actually I used :

mailx -r "test" someone@hotmail.com < somefile

When I open my email, I always receive the attachment as message.txt. I want the attachment to be message.rpt. Is there something I need to configure so that my attachments are in .rpt instead .txt.

Thanks.
Robin Wakefield
Honored Contributor

Re: How to attach a file in mailx

Hi Steven,

How about:

uuencode somefile.txt somefile.rpt| mailx -s "test" someone@hotmail.com

This should deliver the attachment with the name "somefile.rpt".

Rgds, Robin.