Net::SMTP::SSL - SSL support for Net::SMTP


Net-SMTP-SSL documentation Contained in the Net-SMTP-SSL distribution.

Index


Code Index:

NAME

Top

Net::SMTP::SSL - SSL support for Net::SMTP

SYNOPSIS

Top

  use Net::SMTP::SSL;

  my $smtps = Net::SMTP::SSL->new("example.com", Port => 465);

DESCRIPTION

Top

Implements the same API as Net::SMTP, but uses IO::Socket::SSL for its network operations. Due to the nature of Net::SMTP's new method, it is not overridden to make use of a default port for the SMTPS service. Perhaps future versions will be smart like that. Port 465 is usually what you want, and it's not a pain to specify that.

For interface documentation, please see Net::SMTP.

SEE ALSO

Top

Net::SMTP, IO::Socket::SSL, perl.

AUTHOR

Top

Casey West, <casey@geeknest.com>.

COPYRIGHT

Top


Net-SMTP-SSL documentation Contained in the Net-SMTP-SSL distribution.

package Net::SMTP::SSL;
# $Id: SSL.pm,v 1.1 2004/07/20 03:22:18 cwest Exp $
use strict;

use vars qw[$VERSION @ISA];
$VERSION = sprintf "%d.%02d", split m/\./, (qw$Revision: 1.1 $)[1];

use IO::Socket::SSL;
use Net::SMTP;

@ISA = ( 'IO::Socket::SSL',
         grep { $_ ne 'IO::Socket::INET' } @Net::SMTP::ISA );

no strict 'refs';
foreach ( keys %Net::SMTP:: ) {
    next unless defined *{$Net::SMTP::{$_}}{CODE};
    *{$_} = \&{"Net::SMTP::$_"};
}

1;

__END__