#! /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;