use Net::SMTP; my $smtp = Net::SMTP->new("10.10.100.200) || die "Couldnt reach the email server\n"; $smtp->mail( "test\@test.ie" ); $smtp->to( "receiver\@helpme.com" ); $smtp->data(); $smtp->datasend("To: receiver\@helpme.com\n"); $smtp->datasend("From: test\@test.ie\n"); $smtp->datasend("Subject: blah blah blah\n"); $smtp->datasend("\n"); $smtp->datasend("lots of blah blah blah\n"); $smtp->dataend(); $smtp->quit();