#! /usr/bin/perl use strict; use Net::SMTP::SSL; my $smtp = Net::SMTP::SSL->new('smtpout.secureserver.net', Port => 465, Hello => 'mydomain.org', Debug => 1) or die $!; defined($smtp->auth('me@mydomain.org', 'xxxxxxxx')) or die $!; $smtp->mail('me@mydomain.org') or die $!; $smtp->to('them@theirdomain.com') or die $!; $smtp->data or die $!; $smtp->datasend("From: me\@mydomain.org") or die $!; $smtp->datasend("To: them\@theirdomain.com") or die $!; $smtp->datasend("Subject: This is a test") or die $!; $smtp->datasend("\n") or die $!; $smtp->datasend("This is test #1.\n") or die $!; $smtp->dataend or die $!; $smtp->quit or die $!; exit; #### Net::SMTP::SSL>>> Net::SMTP::SSL(1.01) Net::SMTP::SSL>>> IO::Socket::SSL(1.22) Net::SMTP::SSL>>> IO::Socket::INET(1.31) Net::SMTP::SSL>>> IO::Socket(1.31) Net::SMTP::SSL>>> IO::Handle(1.28) Net::SMTP::SSL>>> Exporter(5.63) Net::SMTP::SSL>>> Net::Cmd(2.29) Net::SMTP::SSL=GLOB(0x353486c)<<< 220 p3plsmtpa01-06.prod.phx3.secureserver.net ESMTP Net::SMTP::SSL=GLOB(0x353486c)>>> EHLO mydomain.org Net::SMTP::SSL=GLOB(0x353486c)<<< 250-p3plsmtpa01-06.prod.phx3.secureserver.net Net::SMTP::SSL=GLOB(0x353486c)<<< 250-AUTH LOGIN PLAIN Net::SMTP::SSL=GLOB(0x353486c)<<< 250-8BITMIME Net::SMTP::SSL=GLOB(0x353486c)<<< 250 PIPELINING Net::SMTP::SSL=GLOB(0x353486c)>>> AUTH LOGIN Net::SMTP::SSL=GLOB(0x353486c)<<< 235 Authentication succeeded. Net::SMTP::SSL=GLOB(0x353486c)>>> MAIL FROM: Net::SMTP::SSL=GLOB(0x353486c)<<< 250 Sender accepted. Net::SMTP::SSL=GLOB(0x353486c)>>> RCPT TO: Net::SMTP::SSL=GLOB(0x353486c)<<< 250 Recipient accepted. Net::SMTP::SSL=GLOB(0x353486c)>>> DATA Net::SMTP::SSL=GLOB(0x353486c)<<< 354 End your message with a period. Net::SMTP::SSL=GLOB(0x353486c)>>> From: me@mydomain.org Net::SMTP::SSL=GLOB(0x353486c)>>> To: them@theirdomain.com Net::SMTP::SSL=GLOB(0x353486c)>>> Subject: This is a test Net::SMTP::SSL=GLOB(0x353486c)>>> This is test #1. Net::SMTP::SSL=GLOB(0x353486c)>>> . Net::SMTP::SSL=GLOB(0x353486c)<<< 250 Accepted message qp 26296 bytes 251 Net::SMTP::SSL=GLOB(0x353486c)>>> QUIT Net::SMTP::SSL=GLOB(0x353486c)<<< 221 Good bye.