http://qs321.pair.com?node_id=718593


in reply to Trapping server responses with Net::SMTP

instead of
if ( $smtp->status() =~ /^[45]$/ ) {
you could use
if ( ! $smtp->ok ) {