Skip to content

Instantly share code, notes, and snippets.

Created January 12, 2010 23:40
Show Gist options
  • Save anonymous/275760 to your computer and use it in GitHub Desktop.
Save anonymous/275760 to your computer and use it in GitHub Desktop.
my $smtp = Net::SMTP->new("hostename.blarg", Hello=>"my.rev.name", Debug=>1)
or croak $!;
$smtp->mail('doosh@landlord.com');
$smtp->to(qw(dude@domain.com whateverguy@target.tld));
$smtp->data;
$smtp->datasend(qq("From: "The Shandorion" <doosh@landlord.com>\n));
$smtp->datasend("To: people, people, people\n");
$smtp->datasend("Subject: whatever...\n");
$smtp->datasend("Reply-To: whatever\n");
$smtp->datasend("\n");
$smtp->datasend($msg);
$smtp->dataend;
$smtp->quit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment