Skip Menu |

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

Report information
The Basics
Id: 97759
Status: resolved
Priority: 0/
Queue: Email-Send-SMTP-Gmail

People
Owner: Nobody in particular
Requestors: lyle [...] netcourrier.com
Cc:
AdminCc:

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



Subject: [enhancement] Error system, timeout, banner method
Date: Tue, 5 Aug 2014 13:35:07 +0200 (CEST)
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: lyle [...] netcourrier.com
Hi, First thanks for your work. My ticket is not a bug but about some enhancement. When there is a problem, the library send back '-1' and not the object. Could we have something near other modules (like DBI, ...): returns 'undef' and have a method and a variable (for the 'new') to get the error ? Right now, we need to redirect 'stdout' in a variable. Moreover, could we have also the last error code and message (from smtp server) ? The 'banner' function and set the 'timeout' in 'new' ? :) Best regards,
Hi, Thank you for your suggestions. A new release has been published on CPAN (0.87). It has several enhancements, we think, you may like: 1) $mail->banner() returns the smtp banner 2) new(-timeout=>50) is now supported Regarding on how the errors are managed: Currently, we cannot change the behaviour returning undef instead of '-1' because we should keep backward compatibility. Anyway, some improvements were done. For example, you can retrieve the error code/message, doing: my ($email,$error)=Email::Send::SMTP::Gmail->new(smtp=>....) print "Error: $error\n" if ($email==-1); Hope this helps Peco On Tue Aug 05 07:35:27 2014, lyle@netcourrier.com wrote: Show quoted text
> > Hi, > > > First thanks for your work. My ticket is not a bug but about some > enhancement. > > When there is a problem, the library send back '-1' and not the > object. Could we have something near other modules (like DBI, ...): > returns 'undef' and have a method and a variable (for the 'new') to > get the error ? > > Right now, we need to redirect 'stdout' in a variable. > > > > Moreover, could we have also the last error code and message (from > smtp server) ? The 'banner' function and set the 'timeout' in 'new' ? > :) > > > > Best regards,
Improvements added on the latest realease