Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailx with attachment

Status
Not open for further replies.

modfather

MIS
Feb 15, 2000
75
US
Can someone help me? We're using HP-UX 11 and I'm trying to send an email, and attach an ascii file. I want this to be an attachment, not inline text. Is this possible?

Right now, I'm using:

mailx -s MySubject -r myreal@email.com MyRecipient@aol.com < /tmp/filenametoattach

The problem is, this file is included as in-line text. I was hoping to make it an attachment. Is that possible?

Many thanks!
modfather
 
I use the following (code fragment) to throw a file out as an attachment as far as outlook is concerned...

.
.
uuencode /tmp/$NEWTITLE.zip.$PNO $NEWTITLE.zip >> /tmp/zenmail.$PNO
.
.
.
cat /tmp/zenmail.$PNO | mailx -m -s &quot;$SUBJECT&quot; $RECIPIENT
.
.

Basically, if you uuencode the 'attachment' then outlook sees it as an attachment. Code fragment above is from a printer interface file - the site I'm working at needs to email reports vi athe lp command.
 
Thanks! Worked! The only minor problem I have is that Outlook decodes it perfectly, but if I send it to my yahoo.com account, it doesn't. Any idea why?

Thanks again!
modfather
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top