Quick perl script to test smtp auth


use warnings;
use strict;

use Net::SMTP;

my $smtpserver = 'xxx.yyy.zzz.www';
my $smtpuser   = 'foo@bar.com';
my $fromemail  = 'bleh@bar.com';

my $smtp = Net::SMTP->new($smtpserver, Timeout => 10, Debug => 1);
die "Could not connect to server!\n" unless $smtp;

  $smtp->auth ( 'user', 'secret' ) or die "Could not authenticate $!";
  $smtp->datasend("To: somebody\@bar.com\n");
  $smtp->datasend("From: $fromemail\n");
  $smtp->datasend("Body message\n");


Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.