if ( $smtp->status() =~ /^[45]$/ ) { if ( $smtp->message() eq "size limit exceeded" ) { print "Server returned a fatal error:\n"; print $smtp->code(), " ", $smtp->message(), "\n"; print "The message is too big. Boo-hoo\n"; } }