Showing results for 
Search instead for 
Did you mean: 

Mailx on HP-UX

rick sussman
Occasional Visitor

Mailx on HP-UX

We are having a problem with mailx working on HP-UX when the mail message has an attachment. The example below is the code that works on TRU64. The message is successfully sent but the attachment content is all jumbled. The issue appears to be related to the uuencode command.
title="HTML Mail from PDprod01 For $(date +%b%d%Y)"

#uuencode $p2 $work_file | mailx -s "$title"

uuencode $p2 $work_file | sendmail -s "$title" $UNIX_ONCALL_5

Rita C Workman
Honored Contributor

Re: Mailx on HP-UX

Let me go out on limb on this subject again....
mailx is a message and broadcasting 'utility'.
Can you send mail with this tool? - Yes, ..but..

And it is the ..but.. you are seeing. Sendmail , on the other hand is intended for internet mail. Elm uses Sendmail, so it is far more reliable (IMHO), for external mail.

My personal preference, because of it's diversity in sending attachments of ALL kinds is to utilize the [ include ]. There are other methods that can be used as well (third party vendors, etc. But I still like the flexibility of [ include ].

You can do a search for threads on this subject: MIME attachment

Here's one to get you started:

Hope this helps,
Dave La Mar
Honored Contributor

Re: Mailx on HP-UX

Rick -
I believe Rita hit it on the head with the -m option, In any regard, attached are multiple examples of using mailx.

Best regards,

"I'm not dumb. I just have a command of thoroughly useless information."
Carlo Corthouts
Frequent Advisor

Re: Mailx on HP-UX


The attachment given previously has some very interesting things.

I always like using the one with ux2dos.