.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Mail::Mailer 3" .TH Mail::Mailer 3 "2007-05-11" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" Mail::Mailer \- Simple interface to electronic mailing mechanisms .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Mail::Mailer; \& use Mail::Mailer qw(mail); # specifies default mailer .Ve .PP .Vb 1 \& $mailer = new Mail::Mailer; .Ve .PP .Vb 1 \& $mailer = new Mail::Mailer $type, @args; .Ve .PP .Vb 1 \& $mailer->open(\e%headers); .Ve .PP .Vb 1 \& print $mailer $body; .Ve .PP .Vb 1 \& $mailer->close; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Sends mail using any of the built-in methods. As \f(CW$type\fR you can specify any of: .ie n .IP """sendmail""\fR Use the \f(CW""sendmail"" program to deliver the mail." 4 .el .IP "\f(CWsendmail\fR Use the \f(CWsendmail\fR program to deliver the mail." 4 .IX Item "sendmail Use the sendmail program to deliver the mail." .PD 0 .ie n .IP """smtp""" 4 .el .IP "\f(CWsmtp\fR" 4 .IX Item "smtp" .PD Use the \f(CW\*(C`smtp\*(C'\fR protocol via Net::SMTP to deliver the mail. The server to use can be specified in \f(CW@args\fR with .Sp .Vb 1 \& $mailer = new Mail::Mailer 'smtp', Server => $server; .Ve .Sp The smtp mailer does not handle \f(CW\*(C`Cc\*(C'\fR and \f(CW\*(C`Bcc\*(C'\fR lines, neither their \&\f(CW\*(C`Resent\-*\*(C'\fR fellows. The \f(CW\*(C`Debug\*(C'\fR options enables debugging output from \f(CW\*(C`Net::SMTP\*(C'\fR. .Sp You may also use the \f(CW\*(C`Auth => [ $user, $password ]\*(C'\fR option for \s-1SASL\s0 authentication (requires Authen::SASL and MIME::Base64). .ie n .IP """qmail""" 4 .el .IP "\f(CWqmail\fR" 4 .IX Item "qmail" Use qmail's qmail-inject program to deliver the mail. .ie n .IP """testfile""" 4 .el .IP "\f(CWtestfile\fR" 4 .IX Item "testfile" Used for debugging, this displays the data to the file named in \&\f(CW$Mail::Mailer::testfile::config{outfile}\fR which defaults to a file named \f(CW\*(C`mailer.testfile\*(C'\fR. No mail is ever sent. .PP \&\f(CW\*(C`Mail::Mailer\*(C'\fR will search for executables in the above order. The default mailer will be the first one found. .Sh "\s-1ARGUMENTS\s0" .IX Subsection "ARGUMENTS" \&\f(CW\*(C`new\*(C'\fR can optionally be given a \f(CW$type\fR, which is one \f(CW\*(C`sendmail\*(C'\fR, \f(CW\*(C`mail\*(C'\fR, ... given above. .PP \&\f(CW\*(C`open\*(C'\fR is given a reference to a hash. The hash consists of key and value pairs, the key being the name of the header field (eg, \f(CW\*(C`To\*(C'\fR), and the value being the corresponding contents of the header field. The value can either be a scalar (eg, \f(CW\*(C`gnat@frii.com\*(C'\fR) or a reference to an array of scalars (\f(CW\*(C`eg, ['gnat@frii.com', 'Tim.Bunce@ig.co.uk']\*(C'\fR). .SH "TO DO" .IX Header "TO DO" Assist formatting of fields in ...::rfc822:send_headers to ensure valid in the face of newlines and longlines etc. .PP Secure all forms of \fIsend_headers()\fR against hacker attack and invalid contents. Especially \*(L"\en~...\*(R" in ...::mail::send_headers. .SH "ENVIRONMENT VARIABLES" .IX Header "ENVIRONMENT VARIABLES" .IP "\s-1PERL_MAILERS\s0" 4 .IX Item "PERL_MAILERS" Augments/override the build in choice for binary used to send out our mail messages. .Sp Format: .Sp .Vb 1 \& "type1:mailbinary1;mailbinary2;...:type2:mailbinaryX;...:..." .Ve .Sp Example: assume you want you use private sendmail binary instead of mailx, one could set \f(CW\*(C`PERL_MAILERS\*(C'\fR to: .Sp .Vb 1 \& "mail:/does/not/exists:sendmail:$HOME/test/bin/sendmail" .Ve .Sp On systems which may include \f(CW\*(C`:\*(C'\fR in file names, use \f(CW\*(C`|\*(C'\fR as separator between type\-groups. .Sp .Vb 1 \& "mail:c:/does/not/exists|sendmail:$HOME/test/bin/sendmail" .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Mail::Send .SH "AUTHORS" .IX Header "AUTHORS" Maintained by Mark Overmeer .PP Original code written by Tim Bunce <\fITim.Bunce@ig.co.uk\fR>, with a kick start from Graham Barr <\fIgbarr@pobox.com\fR>. With contributions by Gerard Hickey <\fIhickey@ctron.com\fR> Small fix and documentation by Nathan Torkington <\fIgnat@frii.com\fR>.