Operating System - HP-UX
1825729 Members
2766 Online
109687 Solutions
New Discussion

Re: problem using mailx to attach pdf files

 
Patti Johnson
Respected Contributor

problem using mailx to attach pdf files

I'm using the following script to send mail with a standard body and pdf attachments.

(cat statement.txt
uuencode $1 $1) |mailx -m -s "Statement" $2

I pass the name of the pdf file and the email address to this script. It works correctly when the mail is received on our internal mail system - but when I send the mail to an external account (yahoo.com or msn.com )the pdf file is inline - not an attachment.

Can someone explain why this is happening, we will eventually use this process to mail statements in pdf format to customers.

Thanks,
Patti
3 REPLIES 3
RAC_1
Honored Contributor

Re: problem using mailx to attach pdf files

Hoe about following

uuencode $1 $1 | mailx -s "Subject" $2 < statement.txt

Anil
There is no substitute to HARDWORK
Patti Johnson
Respected Contributor

Re: problem using mailx to attach pdf files

That didn't work - I did not get the attachment - just the message body.

Just before I posted this I tried adding the -m option to mailx. Originally I thought it was still failing - but I was wrong.

With the -m option it works correctly regardless of where I send the message.

Closing....
Patti Johnson
Respected Contributor

Re: problem using mailx to attach pdf files

working now