Hmm, I just use IO::Socket --
use IO::Socket;
# ....
## open socket to smtp server
#
syslog('debug', "Opening smtp socket");
$smtp = IO::Socket::INET->new(Proto => "tcp",
PeerAddr => "${mailhost}:25")
or do { ## bad news
$mailhostDown = 1;
syslog('crit', "Mail server down!", $!);
exception('crit', "Unable to open socket to $mailhost!", $!);
};
## write to socket, sending email
#
<$smtp> and print $smtp "EHLO $hostname\r\n";
<$smtp> and print $smtp "MAIL FROM: <$fromAddr>\r\n";
for ( @{ $recipients } ) {
next unless $_;
<$smtp> and print $smtp "RCPT TO: $_\r\n";
}
<$smtp> and print $smtp "DATA\r\n";
<$smtp> and print $smtp "From: $fromName <$fromAddr>\r\n";
print $smtp "To: $to\r\n";
print $smtp "Subject: $msg_subject\r\n";
print $smtp "@{$msg}\r\n";
print $smtp "\r\n.\r\n";
<$smtp> and print $smtp "QUIT\r\n";
<$smtp> and $smtp->close;
I'm certain you could send your: AUTH CRAM-MD5 or DIGEST-MD5
or whatever just as easily.