Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 14.2 The Mail ModulesChapter 14
Email Connectivity
Next: Reference: close
 

new

 $mailer = new Mail::Mailer [type, command]

Constructor. Creates a new Mailer object representing the message to be sent. If the optional arguments are specified, the value of command depends on type, which can be one of:

mail

Use the Unix mail program. command is the path to mail. The module searches for mailx, Mail, and mail, in that order.

sendmail

Use the sendmail program. command is the path to sendmail.

test

Used for debugging. Calls /bin/echo to display the data, but doesn't actually send any mail. command is ignored, if specified.

If no arguments are specified, the Mailer object searches for executables in the above order and uses the first one found as the default mailer.


Previous: 14.2 The Mail ModulesPerl in a NutshellNext: Reference: close
14.2 The Mail ModulesBook IndexReference: close

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.