If your SMTP Server requires auth, this may not work, but....
Try to (from a command prompt):
C:\>telnet xx.xxx.1.xxx 25
And that will tell you if you can connect to SMTP on that system.
It should give you back something similar to:
220 systemname Microsoft ESMTP MAIL Service, Version: 5.0.2195.6713
ready at Thu, 9 Nov 2006 15:24:31 -0700
>From there type QUIT
The output could be redically different depending on the resourcefulness
of your SMTP admin and/or the mail server software installed. (the 220
should be somewhere in there)
Steven
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Danna Li
Sent: Thursday, November 09, 2006 1:34 PM
To: Fabricio Soares Martins - Site CBN - SGR;
[email protected]
Subject: Re: RES: smtp authentication
Thanks for pointing me to Mail::Sender! But before I can get to
the smtp authentication part, I was unable to send a simple message to
myself. The error message returned was "connect() failed: Unknown
error". I found the following hints from the doc, but I am sending mail
from Windows.
"If you are able to connect to the mail server and scripts using
Mail::Sendmail work,
but Mail::Sender fails with "connect() failed", please review
the settings in /etc/services.
The port for SMTP should be 25."
Any clue/help is much appreciated!
Thanks,
d
sub SendMailNotice() {
my $subject = "This is a test.";
my $msg = "Trying to make it work";
my $sender = new Mail::Sender {
smtp => 'xx.xxx.1.xxx',
from => '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'> ,
on_errors => 'undef',
}
or die "Can't create the Mail::Sender object:
$Mail::Sender::Error\n";
if (ref ($sender->MailMsg({to => '[EMAIL PROTECTED]'
<mailto:'[EMAIL PROTECTED]'> , subject => 'this is a test',
msg => "Trying to make it work."}))) {
print "Mail sent OK."
} else {
die "$Mail::Sender::Error\n";
}
}
Fabricio Soares Martins - Site CBN - SGR
<[EMAIL PROTECTED]> wrote:
Hi,
Try this module:
mail::sender
in perldoc mail::sender ->
if ($sender->MailMsg({
smtp => 'mail.yourISP.com',
from => '[EMAIL PROTECTED]',
to =>'[EMAIL PROTECTED]',
subject => 'this is a test',
msg => "Hi Johnie.\nHow are you?"
auth => 'NTLM',
authid => 'jenda',
authpwd => 'benda',
}) < 0) {
die "$Mail::Sender::Error\n";
-----Mensagem original-----
De:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] nome de
Danna Li
Enviada em: sexta-feira, 3 de novembro de 2006
17:18
Para: [email protected]
Assunto: smtp authentication
Hello,
I need to send notifications to a large email
list but the company has setup smtp authentication for that particular
email list.
How do I authenticate (smtp) on windows with
perl.
Any help would be greatly appreciated!!
Thanks,
d
________________________________
Low, Low, Low Rates! Check out Yahoo!
Messenger's cheap PC-to-Phone call rates.
<http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.co
m/evt=39663/*http://voice.yahoo.com>
________________________________
Cheap Talk? Check out
<http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.co
m/evt=39663/*http://voice.yahoo.com> Yahoo! Messenger's low PC-to-Phone
call rates.
_______________________________________________
Perl-Win32-Admin mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs