Skip Menu |

This queue is for tickets about the Net-SMTP-TLS-ButMaintained CPAN distribution.

Report information
The Basics
Id: 71686
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Net-SMTP-TLS-ButMaintained

People
Owner: Nobody in particular
Requestors: dave [...] seleno.net
Cc:
AdminCc:

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



Subject: Feature Request: Implement a Debug option
Date: Fri, 14 Oct 2011 14:32:56 -0700
To: bug-Net-SMTP-TLS-ButMaintained [...] rt.cpan.org
From: David Seleno <dave [...] seleno.net>
Please implement these changes to allow passing a "Debug" flag in mailer_args when creating the mailer. This will allow debugging the SMTP transaction easily. perl -v This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi $Net::SMTP::TLS::ButMaintained::VERSION = '0.18'; sub _response { my $me = shift; my $line = $me->{sock}->getline(); print STDERR ">>> $line" if ($me->{Debug}) ; my @rsp = ( $line =~ /(\d+)(.)([^\r]*)/ ); # reverse things so the seperator is at the end... # that way we don't have to get fancy with the return # values for calls that don't require the "more indicator" return ( $rsp[0], $rsp[2], $rsp[1] ); } sub _command { my $me = shift; my $command = shift; print STDERR "<<< $command\n" if ($me->{Debug}) ; $me->{sock}->printf( $command . "\015\012" ); }
Applied in branch rt71686, https://github.com/fayland/Net-SMTP-TLS/ Should get merged and released very soon. On Fri Oct 14 17:31:17 2011, dave@seleno.net wrote: Show quoted text
> Please implement these changes to allow passing a "Debug" flag in > mailer_args when creating the mailer. This will allow debugging the > SMTP transaction easily. > > perl -v > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi