--- SMTP.pm.old 2007-09-03 16:42:54.000000000 +0200
+++ SMTP.pm 2007-09-03 17:07:29.000000000 +0200
@@ -36,7 +36,6 @@
sub send {
my ($class, $message, @args) = @_;
- require Net::SMTP;
if ( @_ > 1 ) {
my %args;
if ( @args % 2 ) {
@@ -53,6 +52,7 @@
: $args{tls} ? 'Net::SMTP::TLS'
: 'Net::SMTP';
+ $class->is_available(%args);
$SMTP->quit if $SMTP;
$SMTP = $smtp_class->new($host, %args);
return failure "Couldn't connect to $host" unless $SMTP;