Net::SMTPS(3pm)
π Net::SMTPS π
okay bestie, so this is Net::SMTPS β the manual page, perl version, and it is literally just SSL/STARTTLS support for Net::SMTP. that's the whole vibe. securing your mail, slaying. π
β¨ SYNOPSYS β¨
use Net::SMTPS;
my $ssl = 'starttls'; # 'ssl' / 'starttls' / undef
my $smtp = Net::SMTPS->new("smtp.example.com", Port => 587, doSSL => $ssl);
like, that's it. that's the whole entrance. gorgeous. π¦
πΈ DESCRIPTION πΈ
so this module is a wrapper for Net::SMTP, and what it does is enable over-SSL / STARTTLS support. that's the assignment and it ate. β¨
it inherits most of all the methods from Net::SMTP(2.X) β so basically you get all the friendly options that came bundled with Net::SMTP, no cap, they're all yours. π«Ά
you control the SSL usage through the options of the new() constructor method. the switch for that is the 'doSSL' option. and if you're a details girlie and want to control the detailed SSL settings, you can set the SSL_* options, which are brought in from IO::Socket::SSL. pls go read the document of IO::Socket::SSL for all the deets on those, i'm not gonna lie to you about them. π
there's just one method difference from Net::SMTP: with this one you can select the SMTP AUTH mechanism as the third option of the auth() method. iconique. π
and okay, real talk moment β as of Version 3.10 of Net::SMTP(libnet), it includes SSL/STARTTLS capabilities, so this wrapper module's significance is... disappareing. (their typo, not mine, i'm keeping it, periodt π). so like. it's giving legacy bestie. but we still love her. π
π CONSTRUCTOR π
new ( [ HOST ] [, OPTIONS ] )β a few options added toNet::SMTP(2.X). πdoSSL { "ssl" | "starttls" | undef }β to specify SSL connection type."ssl"makes the connection wrapped with SSL, and"starttls"uses the SMTP command"STARTTLS". pick your fighter. β¨
π¦ METHODS π¦
most of all methods of Net::SMTP are inherited as is, except for auth(). so like, don't come for the others, they're untouched. πΈ
auth ( USERNAME, PASSWORD [, AUTHMETHOD])β attempts SASL authentication through theAuthen::SASLmodule.AUTHMETHODis your required method of authentication, like'CRAM-MD5','LOGIN', ... etc. and heads up bestie: if your selection does not match the server-offerred AUTH mechanism, authentication negotiation may fail. π so pick the right one fr fr.starttls ( SSLARGS )β upgrades an existing plain connection to SSL. glow up in real time. β¨
π BUGS π
okay so there's a little catch, and it's kinda sneaky: the constructor option'Debug => (N)'(forNet::Cmd) also sets$IO::Socket::SSL::DEBUGwhen SSL is enabled. π two-for-one that you did not order. but good news β you can set'Debug_SSL => {0-3}'separately if you want them decoupled. slay. π
π SEE ALSO π
Net::SMTPIO::Socket::SSLAuthen::SASL
π AUTHOR π
Tomo.M <tomo at cpan.org>
π COPYRIGHT π
Copyright (c) 2020 Tomo.M All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie, we're done here. this was perl v5.36.0, dated 2022-10-16, page Net::SMTPS(3pm) β k thanks bye, go secure your mail, mwah π«Άππ
π¦ where this page comes from
- ubuntu noble: libnet-smtps-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-smtps-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-smtps-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms