package Mail::SMTP; require Net::SMTP; $VERSION="1.0"; @ISA=qw(Net::SMTP); sub auth { my $self = shift; my $code; my $CMD_MORE = 3; my $CMD_OK = 2; my @cmd = ("AUTH LOGIN"); push @cmd, 'xxxxx='; # Base64 encoded username while (($code = $self->command(@cmd)->response()) == $CMD_MORE) { @cmd = ('xxxxx='); # Base64 encoded password } $code == $CMD_OK; } 1;