Changing sender address with mpack (788 Views)
Reply
Frequent Advisor
David L Brewster
Posts: 58
Registered: ‎01-12-2006
Message 1 of 4 (788 Views)

Changing sender address with mpack

Hi

I am trying to send out attachments with mpack and the current release that I'm using, Version 1.5, does not allow for you to change the senders address. Would you know if newer releases of mpack allow for that ?

Would you know of a better way to send out emails with attachments, in batch mode, that work with the majority of the email clients ?

We have tested sendmail and mailx working with some mail clients and not working with others.

Thanks
Please use plain text.
Honored Contributor
Steven Schweda
Posts: 9,068
Registered: ‎02-23-2005
Message 2 of 4 (788 Views)

Re: Changing sender address with mpack

> I am trying to send out attachments with
> mpack [...]

How, exactly?

> [...] the current release that I'm using,
> Version 1.5, [...]

Do you mean "[...] the release that I'm
currently using, 1.5, [...]"? I thought that
1.6 was more current than 1.5, but I doubt
that the major features changed much.

> We have tested sendmail and mailx working
> with some mail clients and not working with
> others.

If you think that that's a useful description
of either what you did or what happened when
you did it, then think again.

I don't use this stuff on UNIX, but a quick
look at the documentation and the source
suggests that:

1) If you ask mpack to send the e-mail, then
it probably uses sendmail to do it.

2) You can ask mpack to create an e-mail
message file, but not try to send it anywhere
("-o outputfile"). Then, you can send that
message file, yourself.

If you use method 2, then the question
becomes not what mpack can do, but what
sendmail (or some other e-mail client
program) can do. And that way, at least, you
have more control over the sendmail (or
whatever) command line than you do if you let
mpack do all the work.

Knowing nothing about your OS or your
sendmail program, I hesitate to suggest any
particular command-line options, but you
might see if "-f" does anything for you.
Please use plain text.
Occasional Advisor
Thomas Broccoletti
Posts: 8
Registered: ‎09-09-2008
Message 3 of 4 (788 Views)

Re: Changing sender address with mpack


Steve

We are running HPUX 11.11 V1 with 8.9.3 of sendmail.

We are trying to send out emails with attachments to people by a batch job running on the HPUX 11.11 v1 server. When we send out emails with attachments using mpack it works fine, however, we are not about to change the senders email address, the email goes out with the unix id of the bacth executing the mailx command.

When we started testing with mailx for outbound email with attachments with changing the senders address that worked fine, however, some email clients would not interpret the attachment correctly and they would see garbage in the body of the email. I think it has to do with correct mime type handling. I beleive the email should go out with the content-type of multipart/alternative.

Any suggustions ?
Please use plain text.
Occasional Visitor
Alexander_K
Posts: 1
Registered: ‎10-02-2012
Message 4 of 4 (650 Views)

Re: Changing sender address with mpack

As the previous poster already said, write the mail to a file and then use sendmail:

MAIL=$(mktemp)

mpack -o $MAIL file

echo "To: you@company.com" >$MAIL.head

echo "From: me@company.com" >>$MAIL.head

cat $MAIL.head $MAIL|sendmail -i -t

rm $MAIL.head $MAIL

 

Please use plain text.
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