Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Send CPAN distribution.

Report information
The Basics
Id: 42098
Status: resolved
Priority: 0/
Queue: Email-Send

People
Owner: Nobody in particular
Requestors: pet [...] painfullscratch.nl
Cc:
AdminCc:

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



Subject: Email::Send::SMTP doesn't always finish SMTP transaction properly
Date: Fri, 2 Jan 2009 13:44:30 +0100
To: bug-Email-Send [...] rt.cpan.org
From: Patrick <pet [...] painfullscratch.nl>
This is a follow up on https://bugs.launchpad.net/bugs/228679 Email::Send::SMTP doesn't always finish SMTP transaction properly. (The same seems to apply for the current dev-version of Email::Sender as well). Email::Send::DESTROY sends the SMTP QUIT when the object gets out of scope. However, there are certain scenarios in which the transaction could already be closed by the SMTP server, due to a connection timeout. Example: =begin of example= # some code here my $sender = Email::Send->new({mailer => 'SMTP'}); $sender->mailer_args([Host=> 'smtp.example.com']); $sender->send($message); # some other code that could take more than a couple of seconds # ... meanwhile, the SMTP server's transaction timeout is passed # etc etc =end of example= =begin quote from RFC 2821 (http://www.ietf.org/rfc/rfc2821.txt)= The last command in a session MUST be the QUIT command. The QUIT command cannot be used at any other time in a session, but SHOULD be used by the client SMTP to request connection closure, even when no session opening command was sent and accepted. =end quote from RFC 2821 (http://www.ietf.org/rfc/rfc2821.txt)= Maybe it's better to send the QUIT right after the send() method is issued. Another option could be to keep the connection open (using NOOP) in some way until the object gets out of scope.
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #42098] Email::Send::SMTP doesn't always finish SMTP transaction properly
Date: Fri, 2 Jan 2009 10:37:46 -0500
To: Patrick via RT <bug-Email-Send [...] rt.cpan.org>
From: Ricardo SIGNES <rjbs [...] cpan.org>
* Patrick via RT <bug-Email-Send@rt.cpan.org> [2009-01-02T07:44:48] Show quoted text
> Email::Send::SMTP doesn't always finish SMTP transaction properly. > (The same seems to apply for the current dev-version of Email::Sender > as well).
Yes, although in Sender it's because I'm a bit thick. In Send it's... for other reasons. Show quoted text
> Maybe it's better to send the QUIT right after the send() method is > issued. Another option could be to keep the connection open (using > NOOP) in some way until the object gets out of scope.
I've implemented the first. The second is basically not doable in a reasonable way. I have not tested this change. It's at GitHub. http://github.com/rjbs/email-send/tree/master If you would look into the version there, and let me know that it solves this problem, I would appreciate it. I'm very, very busy right now. If this sorts things out, I will release. -- rjbs
Subject: Re: [rt.cpan.org #42098] Email::Send::SMTP doesn't always finish SMTP transaction properly
Date: Fri, 2 Jan 2009 23:02:59 +0100
To: bug-Email-Send [...] rt.cpan.org
From: Patrick <pet [...] painfullscratch.nl>
Hi Ricardo, I've tested with commit 552c1aaa9f87d8ba730f8dd7c55d4908e2b1d013. Tests were successful. Thanks On Fri, Jan 2, 2009 at 16:38, Ricardo SIGNES via RT <bug-Email-Send@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=42098 > > > * Patrick via RT <bug-Email-Send@rt.cpan.org> [2009-01-02T07:44:48]
>> Email::Send::SMTP doesn't always finish SMTP transaction properly. >> (The same seems to apply for the current dev-version of Email::Sender >> as well).
> > Yes, although in Sender it's because I'm a bit thick. In Send it's... for > other reasons. >
>> Maybe it's better to send the QUIT right after the send() method is >> issued. Another option could be to keep the connection open (using >> NOOP) in some way until the object gets out of scope.
> > I've implemented the first. The second is basically not doable in a reasonable > way. I have not tested this change. It's at GitHub. > > http://github.com/rjbs/email-send/tree/master > > If you would look into the version there, and let me know that it solves this > problem, I would appreciate it. I'm very, very busy right now. If this sorts > things out, I will release. > > -- > rjbs > >
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #42098] Email::Send::SMTP doesn't always finish SMTP transaction properly
Date: Fri, 2 Jan 2009 17:51:05 -0500
To: Patrick via RT <bug-Email-Send [...] rt.cpan.org>
From: Ricardo SIGNES <rjbs [...] cpan.org>
* Patrick via RT <bug-Email-Send@rt.cpan.org> [2009-01-02T17:03:14] Show quoted text
> I've tested with commit 552c1aaa9f87d8ba730f8dd7c55d4908e2b1d013. > Tests were successful.
I've cut a new release of both Send and Sender. Enjoy! -- rjbs
Subject: Re: [rt.cpan.org #42098] Email::Send::SMTP doesn't always finish SMTP transaction properly
Date: Sat, 3 Jan 2009 11:49:16 +0100
To: bug-Email-Send [...] rt.cpan.org
From: Patrick <pet [...] painfullscratch.nl>
Super! Many thanks! Could you please close this ticket? Best regards, Patrick