Skip Menu |
 

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

Report information
The Basics
Id: 29135
Status: new
Priority: 0/
Queue: Net-SMTP-TLS

People
Owner: Nobody in particular
Requestors: andreas.marienborg [...] gmail.com
Cc:
AdminCc:

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



Subject: Problems with interoperation with Email::Send::SMTP
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1188831805-24187-1"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 475
Download (untitled) / with headers
text/plain 475b
The attached patch makes sure Net::SMTP::TLS returns true in the places that Email::Send::SMTP expects it to return true. It also adds very basic support for the Debug option that Net::SMTP supports. Another thing it fixes to work with Email::Send::SMTP, is to accept data to ->data(), which it forwards to datasend and calls dataend, to do it the same way as Net::SMTP does it. if I need to change anything in the patch to have it applied and released, please let me know.
Subject: net-smtp-tls-patch.01.patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1188831805-24187-0"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: text/x-diff; name="net-smtp-tls-patch.01.patch"
Content-Disposition: inline; filename="net-smtp-tls-patch.01.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 1396
--- TLS.pm.old 2007-09-03 16:47:40.000000000 +0200 +++ TLS.pm 2007-09-03 16:57:02.000000000 +0200 @@ -129,6 +129,7 @@ sub _command { my $me = shift; my $command = shift; + warn "< " . $command . "\n" if $me->{Debug}; $me->{sock}->printf($command."\015\012"); } @@ -137,6 +138,8 @@ sub _response { my $me = shift; my $line = $me->{sock}->getline(); + warn "> " . $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 @@ -278,6 +281,7 @@ if(not $num == 250){ croak "Could't set FROM: $num $txt\n"; } + return 1; } # send the RCPT TO: <addr> command @@ -315,6 +319,13 @@ if(not $num == 354){ croak "Data failed: $num $txt\n"; } + # We try to send data as well, if we have additional parameters, + # since Net::SMTP does this. + if (scalar(@_)) { + $me->datasend(@_); + $me->dataend(); + } + return 1; } # send stuff over raw (for use as message body) @@ -360,6 +371,7 @@ my $wout; if (select(undef,$wout=$win, undef, $timeout) > 0 or -f $cmd->{sock}) # -f for testing on win32 { + warn "< " . $line; my $w = syswrite($cmd->{sock}, $line, $len, $offset); unless (defined($w)) { @@ -374,7 +386,7 @@ return undef; } } - + return 1; } # end the message body submission by a line with nothing


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.