@@ -10,3 +10,7 @@ Revision history for Perl extension Net::SMTPS.
0.03 Thu Mar 25 18:00:00 2013
- fix new() for multiple call
+0.04 Thu Oct 24 18:15:00 2014
+ - fix new() for Ticket #99743 "problem with ipv6/v4 autodetection on win32 ...
+ (thanks, <alexz .. opmantek.com>)
+
@@ -4,9 +4,9 @@
"Tomo.M <tomo@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "ExtUtils::MakeMaker version 6.58, CPAN::Meta::Converter version 2.110930001",
+ "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.120351",
"license" : [
- "perl"
+ "unknown"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
@@ -22,22 +22,22 @@
"prereqs" : {
"build" : {
"requires" : {
- "ExtUtils::MakeMaker" : 0
+ "ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : 0
+ "ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
- "Authen::SASL" : "2.15",
+ "Authen::SASL" : "2",
"IO::Socket::SSL" : "1",
"Net::SMTP" : "2"
}
}
},
"release_status" : "stable",
- "version" : "0.01"
+ "version" : "0.04"
}
@@ -7,8 +7,8 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 6.58, CPAN::Meta::Converter version 2.110930001'
-license: perl
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.120351'
+license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
@@ -18,7 +18,7 @@ no_index:
- t
- inc
requires:
- Authen::SASL: 2.15
+ Authen::SASL: 2
IO::Socket::SSL: 1
Net::SMTP: 2
-version: 0.01
+version: 0.04
@@ -8,7 +8,7 @@ WriteMakefile(
PREREQ_PM => {
'Net::SMTP' => 2.0,
'IO::Socket::SSL' => 1.0,
- 'Authen::SASL' => 2.15,
+ 'Authen::SASL' => 2.0,
},
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/Net/SMTPS.pm', # retrieve abstract from module
@@ -1,4 +1,4 @@
-Net-SMTPS version 0.01
+Net-SMTPS version 0.04
======================
This module implements a wrapper for Net::SMTP, enabling
@@ -34,7 +34,7 @@ COPYRIGHT AND LICENCE
Put the correct copyright and licence information here.
-Copyright (C) 2013 by Tomo
+Copyright (C) 2014 by Tomo
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.12.3 or,
@@ -8,7 +8,7 @@ package Net::SMTPS;
use vars qw ( $VERSION @ISA );
-$VERSION = "0.03";
+$VERSION = "0.04";
use base qw ( Net::SMTP );
use Net::Cmd; # import CMD_OK, CMD_MORE, ...
@@ -45,17 +45,24 @@ sub new {
# eliminate IO::Socket::SSL from @ISA for multiple call of new.
@ISA = grep { !/IO::Socket::SSL/ } @ISA;
+ my %_args = map { +"$_" => $arg{$_} } grep {! /^SSL/} keys %arg;
+
my $h;
+ $_args{PeerPort} = $_args{Port} || 'smtp(25)';
+ $_args{Proto} = 'tcp';
+ $_args{Timeout} = defined $_args{Timeout} ? $_args{Timeout} : 120;
+
foreach $h (@{ref($hosts) ? $hosts : [$hosts]}) {
- $obj = $type->SUPER::new(
- PeerAddr => ($host = $h),
- PeerPort => $arg{Port} || 'smtp(25)',
- LocalAddr => $arg{LocalAddr},
- LocalPort => $arg{LocalPort},
- Proto => 'tcp',
- Timeout => defined $arg{Timeout}
- ? $arg{Timeout}
- : 120
+ $_args{PeerAddr} = ($host = $h);
+
+ #if ($_args{Debug}) {
+ # foreach my $i (keys %_args) {
+ # print STDERR "$type>>> arg $i: $_args{$i}\n";
+ # }
+ #}
+
+ $obj = $type->SUPER::new(
+ %_args
)
and last;
}