--------------------original message--------------------
Date: Tue, 14 Jun 2005 11:04:28 +0100
From: "Hughes, Trystan" <[EMAIL PROTECTED]>
Subject: Net::SMTP on a Windows Server
To: <[email protected]>
Message-ID:
 <[EMAIL PROTECTED]>
Content-Type: text/plain;                charset=utf-8


Hi all,
 
Carrying on from my previous question (and the solutions you all put 
forward), it seems I got a most of it sorted, but ran into the problem 
that my company has port 25 block, and so the SMTP Service would be the 
emails I was trying to send into a queue and they would never be sent.
 
We now have a work around, but was wondering if the Net::SMTP Module 
allows us to provide SMTP Authentication (username and password)? I have 
found auth() method, but am not sure if this is the correct method for 
what I want to achieve, or if it is the correct method, where exactly do I 
play it in my code (which is as follows...)
 
use Net::SMTP;
my $smtp = Net::SMTP->new('esr.org.uk',
  Timeout => 30, Debug => 1, LocalPort => 119) or die "Couldn't connect to 
server; $!";
$smtp->mail('[EMAIL PROTECTED]');
$smtp->to('[EMAIL PROTECTED]');
$smtp->data();
$smtp->datasend("To: [EMAIL PROTECTED]");
$smtp->datasend("From: [EMAIL PROTECTED]");
$smtp->datasend("\n");
$smtp->datasend("Error Message");
$smtp->dataend();
$smtp->quit;            # Close SMTP connectin
 
Thanks

--------------------reply follows--------------------

Trystan-

I recently finished using the Mail::Sender package to do some mailing. I 
believe that it allows for port adjustment via the URL that one needs to 
set for the mailserver. ie: (yes, the number here is made up instead of 
the real one) mail_server->http://smtp.schange.com:5252 is one of the 
parameters passed in setting up the mail message

-Josh
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to