1Net::SMTPS(3)         User Contributed Perl Documentation        Net::SMTPS(3)
2
3
4

NAME

6       Net::SMTPS - SSL/STARTTLS support for Net::SMTP
7

SYNOPSYS

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

DESCRIPTION

16       This module implements a wrapper for Net::SMTP, enabling
17       over-SSL/STARTTLS support.  This module inherits most of all the
18       methods from Net::SMTP(2.X). You may use all the friendly options that
19       came bundled with Net::SMTP.  You can control the SSL usage with the
20       options of new() constructor method.  'doSSL' option is the switch,
21       and, If you would like to control detailed SSL settings, you can set
22       SSL_* options that are brought from IO::Socket::SSL. Please see the
23       document of IO::Socket::SSL about these options detail.
24
25       Just one method difference from the Net::SMTP, you can select SMTP AUTH
26       mechanism as the third option of auth() method.
27
28       As of Version 3.10 of Net::SMTP(libnet) includes SSL/STARTTLS
29       capabilities, so this wrapper module's significance disappareing.
30

CONSTRUCTOR

32       new ( [ HOST ] [, OPTIONS ] )
33           A few options added to Net::SMTP(2.X).
34
35           doSSL { "ssl" | "starttls" | undef } - to specify SSL connection
36           type.  "ssl" makes connection wrapped with SSL, "starttls" uses
37           SMTP command "STARTTLS".
38

METHODS

40       Most of all methods of Net::SMTP are inherited as is, except auth().
41
42       auth ( USERNAME, PASSWORD [, AUTHMETHOD])
43           Attempt SASL authentication through Authen::SASL module. AUTHMETHOD
44           is your required method of authentication, like 'CRAM-MD5',
45           'LOGIN', ... etc. If your selection does not match the server-
46           offerred AUTH mechanism, authentication negotiation may fail.
47
48       starttls ( SSLARGS )
49           Upgrade existing plain connection to SSL.
50

BUGS

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

SEE ALSO

57       Net::SMTP, IO::Socket::SSL, Authen::SASL
58

AUTHOR

60       Tomo.M <tomo at cpan.org>
61
63       Copyright (c) 2020 Tomo.M All rights reserved.  This program is free
64       software; you can redistribute it and/or modify it under the same terms
65       as Perl itself.
66
67
68
69perl v5.36.0                      2022-07-22                     Net::SMTPS(3)
Impressum