Lunarpages Web Hosting Forum

Author Topic: SMTP settings for Perl script  (Read 3766 times)

Offline bagpuss03

  • Pong! (the videogame) Master
  • *****
  • Posts: 25
SMTP settings for Perl script
« on: May 27, 2010, 02:41:56 PM »
I have a perl script which currently uses sendmail, but I'd like to change it to SMTP.

I am looking to replace:

$mailprogram = "/usr/sbin/sendmail -t";
$oursalesemail = "email\";

with something like:

use Net::SMTP;
$smtp = Net::SMTP->new(''); # connect to my SMTP server
Timeout => 30;
Helo => $ENV{'SERVER_NAME'};
username => "email\";
password => "password";
$oursalesemail = "email\";

However, I don't think this is quite right. Can you please explain how I would include the correct SMTP settings for perl on LPCP?