sub smtp_connect { for my $s (@server_list) { my $smtp = Net::SMTP->new($s); return $smtp if $smtp; } undef; }