develooper Front page | perl.beginners | Postings from April 2010

AW: sendmail arguments

Thread Previous
From:
Thomas Bätzler
Date:
April 28, 2010 23:51
Subject:
AW: sendmail arguments
Message ID:
E350C77ABFDBD242BDD51F5DA07905C104B55D46@SONNE.gw.bringe.net
John Bruin <john.bruin@nec.co.nz> asked:
> I have inherited a Perl script which sends and parses email. I
> am having trouble trying to figure out what the "-oi" and
> "-oem" arguments do in the sub below. Can anyone help?

"-oe<mode>" sets the ErrorMode.

From http://www.sendmail.org/~ca/email/man/sendmail.html:

  ErrorMode=x
 
  Set error processing to mode x. Valid modes are `m' to mail
  back the error message, `w' to ``write'' back the error mes-
  sage (or mail it back if the sender is not logged in), `p' to
  print the errors on the terminal (default), `q' to throw away
  error messages (only exit status is returned), and `e' to do
  special processing for the BerkNet.  If the text of the mes-
  sage is not mailed back by modes `m' or `w' and if the sender
  is local to this machine, a copy of the message is appended
   to the file dead.letter in the sender's home directory.

And of course that's not a Perl question. The Perl question probably should be about how you can make your inherited code better.

While TIMTOWTDI, I would like to suggest using MIME::Lite for building and sending mails - see http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm#Sending

HTH,
Thomas


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About