Operating System - HP-UX
1747984 Members
4183 Online
108756 Solutions
New Discussion юеВ

create an mailx attachment from hp-ux to external Groupwise email

 
SOLVED
Go to solution

create an mailx attachment from hp-ux to external Groupwise email

Has anyone created a procedure to add
attachments to mailx to send an email
to and external email account based on
Novell Groupwise. I am familiar with
the procedure to use uuencode with
mailx, to create mailx with attachment,
however it does not natively
function with groupwise and the
uuencode added material is displayed as
content within Groupwise email rather
than as the attachment
9 REPLIES 9
Geoff Wild
Honored Contributor

Re: create an mailx attachment from hp-ux to external Groupwise email

Get:

mpack/munpack version 1.5 for unix

Mpack and munpack are utilities for encoding and decoding
(respectively) binary files in MIME (Multipurpose Internet Mail
Extensions) format mail messages. For compatibility with older forms
of transferring binary files, the munpack program can also decode
messages in split-uuencoded format. The Macintosh version can also
decode messages in split-BinHex format.


http://hpux.ee.ualberta.ca/hppd/hpux/Users/mpack-1.5/
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.

Re: create an mailx attachment from hp-ux to external Groupwise email

My preference would be to use
a procedure/utility that is natively
part of the HP-UX system and not add
additional software/programs.
thanks
W.C. Epperson
Trusted Contributor

Re: create an mailx attachment from hp-ux to external Groupwise email

Geoff gave you good advice. If you're going to adhere to your preferences, you'd best read RFC204[5-9] and the Groupwise doc, then start scripting. And be prepared for trial and error with Groupwise. Curiously, it uses pieces of Internet Explorer for rendering certain attachments, will actually call Internet Explorer to fetch an html page in some circumstances, even with Netscape configured as the default browser, and is flat-out broken with respect to rendering some MIME attachments.

Good luck!
"I have great faith in fools; self-confidence, my friends call it." --Poe
Frank Slootweg
Honored Contributor

Re: create an mailx attachment from hp-ux to external Groupwise email

I do not know the first thing about Groupwise, but I do not think that this is a Groupwise problem/question, but just a general problem/question on how to send attachments from HP-UX.

See the thread "Mailing html file from HPUX to outlook" <>, especially my responses.

While that thread talks about *HTML* *bodies*, it is also useful for other content types and for attachments, i.e. you only have to change the "Content-Type: ..." line.

In other threads you may/will find more elaborate scripts [1], but the basic idea is the same, i.e. use echo to construct the header lines and send the resulting header/body/attachment(s) with "sendmail -t".

[1] You may want to search the forum on "mailx sendmail attachment". I thought I had saved some pointers, but apparently I didn't. I *think* one of the respondents was Steven ... .
Chris Vail
Honored Contributor

Re: create an mailx attachment from hp-ux to external Groupwise email

I know your question is about mailx, but let me suggest you try mutt from www.mutt.org. Its a pretty cool mail utility, and scripts much more nicely than does mailx and uuencode. I don't have groupwise, so I can't test it for you, but I'd be astonished if it didn't do what you want it to do.


Chris
Bryan D. Quinn
Respected Contributor

Re: create an mailx attachment from hp-ux to external Groupwise email

Hey Ron,

I don't know if this will help or if you are already using this variation of this command, but this is what I use in a script to send a file attachment with mailx. I did quite a bit of tweaking on this to get it right when I was writing the script. I not only had problems with the attachments, but also with the network configuration. Anyways here is the command that I use.
uuencode $E_FILE $E_FILE | mailx -m -s "Subject" $EMAIL

Hope this helps.
-Bryan
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: create an mailx attachment from hp-ux to external Groupwise email

Okay, if you want to use an HP-UX "standard" utility the the answer is elm - which can be used from the command line or interactively.

Within the body of your email add this:

------------------------------------

This is my text. How are you?


[include /tmp/myattach application/octet-stream base64]

This is some more text in the middle.

[include /tmp/myexcel.xls application/ms-excel base64]

This is a closing message in the email.

----------------------------------------



That will attach /tmp/myattach and /tmp/myexcel.xls. You can include multiple attachments using this method.

Then to use it from a script:
elm -s "My Subject" user@mailserver.com < myletter

Where myletter contains the attachment include statement as well as your message text.
If you are running from the command line, it is also necessary that you have a .elm directory
under the users home directory because unlike the interactive version of elm, the command-line version will not create a .elm directory automatically.

Regards, Clay
If it ain't broke, I can fix that.

Re: create an mailx attachment from hp-ux to external Groupwise email

Thank you one and all, for your reply and
advice !!

I have several options to evaluate, test
and or install

Re: create an mailx attachment from hp-ux to external Groupwise email

Ronald,

What's wrong with using uuencode?
It works for me. Below is a procedure I came up with:
*******************************************************************************
E-mail attachments:

Assume that "test.txt" has the contents for the body of the mail, "test1"
has the contents for the first attachment and "test2" has the contents
for the second attachment)

CODE:

ux2dos text1 > text1.txt
ux2dos text2 > text2.txt

uuencode test1.txt test1.txt >> test.txt
uuencode test2.txt test2.txt >> test.txt
mailx -m -s "Test Subject" tpardike@????.??? < test.txt

This sends a mail with the subject and a body and 2 attachments.

"Test Subject" is sent as the SUBJECT of the mail.
test.txt is sent as the BODY of the mail.
test1.txt is sent as ATTACHMENT 1 in the mail.
test2.txt is sent as ATTACHMENT 2 in the mail.
********************************************************************************

If you have problems with this, I can post a script that sends LVM configuration changes to my GroupWise account as attachments.

Ted Pardike