Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 14. Email ConnectivityChapter 14
Email Connectivity
Next: Reference: data
 

new

 $smtp = Net::SMTP->new(host[, options])

Constructor. Takes the hostname of the remote mail server, host, and possibly some options, and creates a new SMTP object. Any options are passed to new as a hash, where the option is the key. The possible options are:

Debug

Enables debug mode if set to 1. Provides information about your connection, requests, and responses.

Hello

Sends a HELO command to the SMTP server. Takes a string that represents your domain; if not specified, Hello guesses your domain.

Timeout

Time (in seconds) after which the client stops trying to establish a connection with the SMTP server. Defaults to 120 seconds. If the connection cannot be established, the constructor returns undef.


Previous: 14. Email ConnectivityPerl in a NutshellNext: Reference: data
14. Email ConnectivityBook IndexReference: data