-}
-
-#this kludges a "mysmtpsend" method into Mail::Internet for send_email above
-#now updated for MailTools v2!
-package Mail::Internet;
-
-use Mail::Address;
-use Net::SMTP;
-use Net::Domain;
-
-sub Mail::Internet::mysmtpsend($@) {
- my ($self, %opt) = @_;
-
- my $host = $opt{Host};
- my $envelope = $opt{MailFrom}; # || mailaddress();
- my $quit = 1;
-
- my ($smtp, @hello);
-
- push @hello, Hello => $opt{Hello}
- if defined $opt{Hello};
-
- push @hello, Port => $opt{Port}
- if exists $opt{Port};
-
- push @hello, Debug => $opt{Debug}
- if exists $opt{Debug};
-
-# if(!defined $host)
-# { local $SIG{__DIE__};
-# my @hosts = qw(mailhost localhost);
-# unshift @hosts, split /\:/, $ENV{SMTPHOSTS}
-# if defined $ENV{SMTPHOSTS};
-#
-# foreach $host (@hosts)
-# { $smtp = eval { Net::SMTP->new($host, @hello) };
-# last if defined $smtp;
-# }
-# }
-# elsif(ref($host) && UNIVERSAL::isa($host,'Net::SMTP'))
- if(ref($host) && UNIVERSAL::isa($host,'Net::SMTP'))
- { $smtp = $host;
- $quit = 0;
- }
- else
- { #local $SIG{__DIE__};
- #$smtp = eval { Net::SMTP->new($host, @hello) };
- $smtp = Net::SMTP->new($host, @hello);
- }