if ($smtp->supports('AUTH',500,["Command unknown: 'AUTH'"])) { $smtp->auth( $args{AuthUser}, $args{AuthPass} ) or die "SMTP auth() command failed: $!\n" . $smtp->message . "\n"; } else { die "SMTP auth() command not supported on $hostname\n"; }