Net::SMTPS(3pm)

Net::SMTPS3pm

Ssl/starttls support for net::smtp

Synopsys

    use Net::SMTPS;
    my $ssl = 'starttls';   # 'ssl' / 'starttls' / undef
    my $smtp = Net::SMTPS->new("smtp.example.com", Port => 587, doSSL => $ssl);

Overview

This module implements a wrapper for Net::SMTP, enabling over-SSL/STARTTLS support. This module inherits most of all the methods from Net::SMTP(2.X). You may use all the friendly options that came bundled with Net::SMTP. You can control the SSL usage with the options of new() constructor method. 'doSSL' option is the switch, and, If you would like to control detailed SSL settings, you can set SSL_* options that are brought from IO::Socket::SSL. Please see the document of IO::Socket::SSL about these options detail.

Just one method difference from the Net::SMTP, you can select SMTP AUTH mechanism as the third option of auth() method.

As of Version 3.10 of Net::SMTP(libnet) includes SSL/STARTTLS capabilities, so this wrapper module's significance disappareing.

Constructor

new ( [ HOST ] [, OPTIONS ] )

A few options added to Net::SMTP(2.X).

doSSL { "ssl" | "starttls" | undef } - to specify SSL connection type. "ssl" makes connection wrapped with SSL, "starttls" uses SMTP command "STARTTLS".

Methods

Most of all methods of Net::SMTP are inherited as is, except auth().

auth ( USERNAME, PASSWORD [, AUTHMETHOD])

Attempt SASL authentication through Authen::SASL module. AUTHMETHOD is your required method of authentication, like 'CRAM-MD5', 'LOGIN', ... etc. If your selection does not match the server-offerred AUTH mechanism, authentication negotiation may fail.

starttls ( SSLARGS )

Upgrade existing plain connection to SSL.

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12–13

Bugs

Constructor option 'Debug => (N)' (for Net::Cmd) also sets $IO::Socket::SSL::DEBUG when SSL is enabled. You can set 'Debug_SSL => {0-3}' separately.

Author

Tomo.M <tomo at cpan.org>

From libnet-smtps-perl 0.10-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.