Codex

Mail::Mailer

Section: User Contributed Perl Documentation (3pm)

Updated: 2014-01-05

Index?action=index Return to Main Contents


NAME

Mail::Mailer - Simple interface to electronic mailing mechanisms

INHERITANCE

SYNOPSIS

DESCRIPTION

Sends mail using any of the built-in methods. As TYPE argument to new(), you can specify any of

"sendmail"
Use the program to deliver the mail.:
"smtp"
Use the protocol via Net::SMTP to deliver the mail. The server to use can be specified in with
The smtp mailer does not handle and lines, neither their fellows. The options enables debugging output from .
You may also use the option for SASL authentication. To make this work, you have to install the Authen::SASL distribution yourself: it is not automatically installed.

:

"smtps"
Use the smtp over ssl protocol via Net::SMTP::SSL to deliver the mail. Usage is identical to . You have to install Authen::SASL as well.
:
"qmail"
Use qmail's qmail-inject program to deliver the mail.:
"testfile"
Used for debugging, this displays the data to the file named in which defaults to a file named . No mail is ever sent.:
will search for executables in the above order. The default mailer will be the first one found.

METHODS

Constructors

Mail
:Mailer->new(TYPE, ARGS):The TYPE is one of the back-end sender implementations, as described in the DESCRIPTION chapter of this manual page. The ARGS are passed to that back-end.:
$obj->open(HASH)
The HASH consists of key and value pairs, the key being the name of the header field (eg, ), and the value being the corresponding contents of the header field. The value can either be a scalar (eg, ) or a reference to an array of scalars ( ).:

DETAILS

ENVIRONMENT VARIABLES

PERL_MAILERS
Augments/override the build in choice for binary used to send out our mail messages.

Format:

Example: assume you want you use private sendmail binary instead of mailx, one could set to:
On systems which may include in file names, use as separator between type-groups.
:

BUGS

Mail::Mailer does not help with folding, and does not protect against various web-script hacker attacks, for instance where a new-line is inserted in the content of the field.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2007 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html


Index

NAME

INHERITANCE

SYNOPSIS

DESCRIPTION

METHODS

Constructors

DETAILS

ENVIRONMENT VARIABLES

BUGS

SEE ALSO

AUTHORS

LICENSE