Skip Menu |
 

This queue is for tickets about the MailTools CPAN distribution.

Report information
The Basics
Id: 77161
Status: resolved
Priority: 0/
Queue: MailTools

People
Owner: Nobody in particular
Requestors: sunx [...] sunx.name
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug report: Wrong sender seting in Mail::Mailer::smtp
Date: Sat, 12 May 2012 10:02:44 -0000
To: bug-MailTools [...] rt.cpan.org
From: "Vladimir Goshev" <sunx [...] sunx.name>
Hello! Sorry for my English. In Mail::Mailer::smtp module i found a bug (or i think so). If i pass "From" parameter to Mail::Internet->send function, then my SMTP server says following: Net::SMTP=GLOB(0x20e9ab8)>>> MAIL FROM:<root@Merry>#015 Net::SMTP=GLOB(0x20e9ab8)<<< 250 OK Net::SMTP=GLOB(0x20e9ab8)>>> MAIL FROM:<sunx_test@sunx.name>#015 Net::SMTP=GLOB(0x20e9ab8)<<< 503 sender already given So, module try to set sender mail twice. I hope following patch should fix this problem: diff -ur MailTools-2.09.orig/lib/Mail/Mailer/smtp.pm MailTools-2.09/lib/Mail/Mailer/smtp.pm --- MailTools-2.09.orig/lib/Mail/Mailer/smtp.pm 2012-02-25 17:47:44.000000000 +0400 +++ MailTools-2.09/lib/Mail/Mailer/smtp.pm 2012-05-12 13:45:35.134355523 +0400 @@ -32,8 +32,7 @@ ${*$self}{sock} = $smtp; - $smtp->mail(mailaddress); - $smtp->mail($opt{From}) if $opt{From}; + $smtp->mail($opt{From} ? $opt{From} : mailaddress); $smtp->to($_) for @$to; $smtp->data; I think Mail::Mailer::smtps module has same problem with same solution -- Best regards Vladimir Goshev
Subject: Re: [rt.cpan.org #77161] Bug report: Wrong sender seting in Mail::Mailer::smtp
Date: Sat, 12 May 2012 21:57:45 +0200
To: Vladimir Goshev via RT <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
Download (untitled) / with headers
text/plain 936b
* Vladimir Goshev via RT (bug-MailTools@rt.cpan.org) [120512 10:03]: Show quoted text
> Sat May 12 06:02:57 2012: Request 77161 was acted upon. > Transaction: Ticket created by sunx@sunx.name > Queue: MailTools > Subject: Bug report: Wrong sender seting in Mail::Mailer::smtp > Sorry for my English. > > - $smtp->mail($opt{From}) if $opt{From}; > + $smtp->mail($opt{From} ? $opt{From} : mailaddress);
You mean + $smtp->mail($opt{From} || mailaddress); Show quoted text
> I think Mail::Mailer::smtps module has same problem with same solution
It did not support the From option. I have added that. -- Thanks for the report, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Forgot to release it. Today in 2.10. Thanks


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.