01-19-2010 08:05 AM
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.
01-19-2010 11:51 AM
> mpack [...]
> [...] 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
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
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.
01-21-2010 11:41 AM
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 ?
10-02-2012 03:06 AM
As the previous poster already said, write the mail to a file and then use sendmail:
mpack -o $MAIL file
echo "To: email@example.com" >$MAIL.head
echo "From: firstname.lastname@example.org" >>$MAIL.head
cat $MAIL.head $MAIL|sendmail -i -t
rm $MAIL.head $MAIL