Mailx on HP-UX (25 Views)
Occasional Visitor
Posts: 1
Registered: ‎06-21-2004
Message 1 of 4 (25 Views)

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

Honored Contributor
Posts: 3,790
Registered: ‎08-03-2000
Message 2 of 4 (25 Views)

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,
Honored Contributor
Posts: 829
Registered: ‎03-27-2001
Message 3 of 4 (25 Views)

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."
Frequent Advisor
Posts: 58
Registered: ‎08-23-2004
Message 4 of 4 (25 Views)

Re: Mailx on HP-UX


The attachment given previously has some very interesting things.

I always like using the one with ux2dos.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.