Problem with SMPT mail

L

L. Stern

Hello

I am installing Bugzilla 2.22 on a Windows 2000 and I have some problem to
configure the mail notification.
In fact no email are sent. My problem is on the use of perl script to send
email.

I have made some simple Perl script (either via Mailer or directly via SMTP)
and it seems OK for me (no error), but no email are sent.

The scripts and logs are below

Exemple 1

Script1

use Mail::Mailer;

$mailer = new Mail::Mailer('smtp', Server => "10.135.1.3",Debug => 2);
#$mailer = new Mail::Mailer 'testfile', Server => "10.135.1.3";

$mailer->open({From => '(e-mail address removed)',
To => '(e-mail address removed)',
Subject => "test 1234",})
or die "Can't open: $!\n";
print $mailer "Ceci est le texte";
$mailer->close();

Trace1

Net::SMTP>>> Net::SMTP(2.29)
Net::SMTP>>> Net::Cmd(2.26)
Net::SMTP>>> Exporter(5.58)
Net::SMTP>>> IO::Socket::INET(1.29)
Net::SMTP>>> IO::Socket(1.29)
Net::SMTP>>> IO::Handle(1.25)
Net::SMTP=GLOB(0x1a4ed48)<<< 220 KIX001 ESMTP Service (Lotus Domino Release
5.0.11) ready at Tue, 30 May 2006 14:25:55 +0200
Net::SMTP=GLOB(0x1a4ed48)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x1a4ed48)<<< 250-KIX001 Hello localhost.localdomain
([136.0.1.0]), pleased to meet you
Net::SMTP=GLOB(0x1a4ed48)<<< 250-HELP
Net::SMTP=GLOB(0x1a4ed48)<<< 250-SIZE 51200000
Net::SMTP=GLOB(0x1a4ed48)<<< 250 PIPELINING
Net::SMTP=GLOB(0x1a4ed48)>>> MAIL FROM:<[email protected]>
Net::SMTP=GLOB(0x1a4ed48)<<< 250 (e-mail address removed)...
Sender OK
Net::SMTP=GLOB(0x1a4ed48)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x1a4ed48)<<< 250 (e-mail address removed)... Recipient OK
Net::SMTP=GLOB(0x1a4ed48)>>> DATA
Net::SMTP=GLOB(0x1a4ed48)<<< 354 Enter message, end with "." on a line by
itself
Net::SMTP=GLOB(0x1a4ed48)>>> Subject: test 1234
Net::SMTP=GLOB(0x1a4ed48)>>> X-Mailer: Mail::Mailer[v1.67] Net::SMTP[v2.29]
Net::SMTP=GLOB(0x1a4ed48)>>> To: (e-mail address removed)
Net::SMTP=GLOB(0x1a4ed48)>>> From: (e-mail address removed)
Net::SMTP=GLOB(0x1a4ed48)>>> Ceci est le texte
Net::SMTP=GLOB(0x1a4ed48)>>> .
Net::SMTP=GLOB(0x1a4ed48)<<< 250 Message accepted for delivery
Net::SMTP=GLOB(0x1a4ed48)>>> QUIT
Net::SMTP=GLOB(0x1a4ed48)<<< 221 KIX001 SMTP Service closing transmission
channel


Exemple 2

Script 2

use Net::SMTP;
my $smtp = Net::SMTP->new('10.135.1.3', Timeout => 30, Debug => 2, ); #
connect to SMTP server
$smtp->auth;
$smtp->mail('(e-mail address removed)');# use the sender's adress here
$smtp->to('(e-mail address removed)'); #recipient's address
$smtp->data(); # Start the mail
$smtp->datasend('test');
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection
exit;

Trace2

Net::SMTP>>> Net::SMTP(2.29)
Net::SMTP>>> Net::Cmd(2.26)
Net::SMTP>>> Exporter(5.58)
Net::SMTP>>> IO::Socket::INET(1.29)
Net::SMTP>>> IO::Socket(1.29)
Net::SMTP>>> IO::Handle(1.25)
Net::SMTP=GLOB(0x1c29bd8)<<< 220 KIX001 ESMTP Service (Lotus Domino Release
5.0.11) ready at Tue, 6Jun 2006 15:04:11 +0200
Net::SMTP=GLOB(0x1c29bd8)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x1c29bd8)<<< 250-KIX001 Hello localhost.localdomain
([136.0.1.0]), pleased to meet you
Net::SMTP=GLOB(0x1c29bd8)<<< 250-HELP
Net::SMTP=GLOB(0x1c29bd8)<<< 250-SIZE 51200000
Net::SMTP=GLOB(0x1c29bd8)<<< 250 PIPELINING
Net::SMTP=GLOB(0x1c29bd8)>>> MAIL FROM:<[email protected]>
Net::SMTP=GLOB(0x1c29bd8)<<< 250 (e-mail address removed)... Sender OK
Net::SMTP=GLOB(0x1c29bd8)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x1c29bd8)<<< 250 (e-mail address removed)... Recipient OK
Net::SMTP=GLOB(0x1c29bd8)>>> DATA
Net::SMTP=GLOB(0x1c29bd8)<<< 354 Enter message, end with "." on a line by
itself
Net::SMTP=GLOB(0x1c29bd8)>>> test
Net::SMTP=GLOB(0x1c29bd8)>>> .
Net::SMTP=GLOB(0x1c29bd8)<<< 250 Message accepted for delivery
Net::SMTP=GLOB(0x1c29bd8)>>> QUIT
Net::SMTP=GLOB(0x1c29bd8)<<< 221 KIX001 SMTP Service closing transmission
channel


Thanks in advance for any help on my problem.

Regards
Laurent STERN
 
B

Brian McCauley

L. Stern said:
Hello

I am installing Bugzilla 2.22 on a Windows 2000 and I have some problem to
configure the mail notification.
In fact no email are sent. My problem is on the use of perl script to send
email.

How have you concluded that?
I have made some simple Perl script (either via Mailer or directly via SMTP)
and it seems OK for me (no error), but no email are sent.

If you connect to the SMTP by hand using a telnet client (e.g. PuTTY or
HyperTerminal) and send mail that way does it work?

Are there any error in the mailer's log?

Are errors being sent to the return path address
<[email protected]>?

Have you tried sending a test mail (by another mechanism) to
<[email protected]> to make sure that it is working?
 
B

Brian McCauley

Brian said:
Are errors being sent to the return path address
<[email protected]>?

Note: if you want to control the return-path (aka envelope-from)
address used by Mail::Mailer::smtp you should set $ENV{MAILADDRESS} .

This is less than clear in the documentation.
 
T

Tintin

L. Stern said:
Hello

I am installing Bugzilla 2.22 on a Windows 2000 and I have some problem to
configure the mail notification.
In fact no email are sent. My problem is on the use of perl script to send
email.

I have made some simple Perl script (either via Mailer or directly via SMTP)
and it seems OK for me (no error), but no email are sent.

The scripts and logs are below

Exemple 1

Script1

use Mail::Mailer;

$mailer = new Mail::Mailer('smtp', Server => "10.135.1.3",Debug => 2);
#$mailer = new Mail::Mailer 'testfile', Server => "10.135.1.3";

$mailer->open({From => '(e-mail address removed)',
To => '(e-mail address removed)',
Subject => "test 1234",})
or die "Can't open: $!\n";
print $mailer "Ceci est le texte";
$mailer->close();

Trace1

Net::SMTP>>> Net::SMTP(2.29)
Net::SMTP>>> Net::Cmd(2.26)
Net::SMTP>>> Exporter(5.58)
Net::SMTP>>> IO::Socket::INET(1.29)
Net::SMTP>>> IO::Socket(1.29)
Net::SMTP>>> IO::Handle(1.25)
Net::SMTP=GLOB(0x1a4ed48)<<< 220 KIX001 ESMTP Service (Lotus Domino Release
5.0.11) ready at Tue, 30 May 2006 14:25:55 +0200
Net::SMTP=GLOB(0x1a4ed48)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x1a4ed48)<<< 250-KIX001 Hello localhost.localdomain
([136.0.1.0]), pleased to meet you
Net::SMTP=GLOB(0x1a4ed48)<<< 250-HELP
Net::SMTP=GLOB(0x1a4ed48)<<< 250-SIZE 51200000
Net::SMTP=GLOB(0x1a4ed48)<<< 250 PIPELINING
Net::SMTP=GLOB(0x1a4ed48)>>> MAIL
FROM: said:
Net::SMTP=GLOB(0x1a4ed48)<<< 250 (e-mail address removed)...
Sender OK
Net::SMTP=GLOB(0x1a4ed48)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x1a4ed48)<<< 250 (e-mail address removed)... Recipient OK
Net::SMTP=GLOB(0x1a4ed48)>>> DATA
Net::SMTP=GLOB(0x1a4ed48)<<< 354 Enter message, end with "." on a line by
itself
Net::SMTP=GLOB(0x1a4ed48)>>> Subject: test 1234
Net::SMTP=GLOB(0x1a4ed48)>>> X-Mailer: Mail::Mailer[v1.67] Net::SMTP[v2.29]
Net::SMTP=GLOB(0x1a4ed48)>>> To: (e-mail address removed)
Net::SMTP=GLOB(0x1a4ed48)>>> From: (e-mail address removed)
Net::SMTP=GLOB(0x1a4ed48)>>> Ceci est le texte
Net::SMTP=GLOB(0x1a4ed48)>>> .
Net::SMTP=GLOB(0x1a4ed48)<<< 250 Message accepted for delivery
Net::SMTP=GLOB(0x1a4ed48)>>> QUIT
Net::SMTP=GLOB(0x1a4ed48)<<< 221 KIX001 SMTP Service closing transmission
channel

There is no problem with your Perl script as can be seen from the above
trace. The SMTP server accepts the email and what happens to it after that
is entirely up to the SMTP server and the whole delivery chain.
 
L

L. Stern

Brian McCauley said:
Note: if you want to control the return-path (aka envelope-from)
address used by Mail::Mailer::smtp you should set $ENV{MAILADDRESS} .

This is less than clear in the documentation.


Thank you,

Setting the $ENV{MAILADDRESS} I received an email with my problem:
In fact the "@" was not properly analyzed (the From and To was modified) and
I just have to change my "(e-mail address removed)" to "name\@foo.com" to make it works

Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top