![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
use Mail::Mailer; use Mail::Mailer qw(mail);
$mailer = new Mail::Mailer;
$mailer = new Mail::Mailer $type, @args;
$mailer->open(\%headers);
print $mailer $body;
$mailer->close;
$command
to the new
method.
$command
is the path to mail.
$command
is the path to sendmail.
/bin/echo
to display the data. No mail is ever sent. $command
is ignored.
Mail::Mailer
will search for executables in the above order. The default mailer will be
the first one found. In the case of mail
Mail::Mailer will search for mail, mailx
and Mail
.
new
can optionally be given a $command
and $type
. $type
is one sendmail, mail, ... given above. The meaning of
$command
depends on $type
.
open
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, To
), and the value being the corresponding contents of the header field. The
value can either be a scalar (eg, gnat@frii.com
) or a reference to an array of scalars (eg, [gnat@frii.com, Tim.Bunce@ig.co.uk]
).
Secure all forms of send_headers()
against hacker attack and
invalid contents. Especially ``\n~...'' in ...::mail::send_headers.
$CommentsMailTo = "perl5@dcs.ed.ac.uk"; include("../syssies_footer.inc");?>