Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

RE: Sending EHLO extension commands to an SMTP server?

by Zarathustra (Beadle)
on Oct 01, 2000 at 00:18 UTC ( [id://34777]=note: print w/replies, xml ) Need Help??


in reply to Sending EHLO extension commands to an SMTP server?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://34777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found