Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 16, 2012, 06:07:01 PM

Pages: [1]   Go Down
  Print  
Author Topic: SMTP settings for Perl script  (Read 1910 times)
bagpuss03
Pong! (the videogame) Master
*****
Offline Offline

Posts: 23


« on: May 27, 2010, 03: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\@domain.com";

with something like:

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

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?
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: