Tom - Yes I use real values. Dr. Ruud - You're right... the extra line is useless and I have cleaned it up accordingly.
Anyways I figured the script out. Here's the final output cleaned up a little bit. Thanks for your help. #!/usr/bin/perl -w use strict; use Net::SMTP; my $mail_server = "mailhost"; my $username = "login"; my $password = "password"; my $msg = "This is a test"; my $smtp = Net::SMTP->new($mail_server, Hello => 'mailhost', Port => 587, Timeout => 60, Debug => 1) or die "Can't open connection to $mail_server:$!\n"; defined ($smtp->auth($username, $password)) or die "Can't authenticate: $!\n"; $smtp->mail('sender'); $smtp->recipient('recipient'); $smtp->data(); $smtp->datasend($msg); $smtp->dataend(); $smtp->quit; exit; __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com