- or download this
Net::Cmd->code()
Net::Cmd->message()
- or download this
# Create ourselves an SMTP object
my $smtp = Net::SMTP->new(
...
$smtp->to("youthere\@mailserver.de")
or die "Error on RCPT TO: ", $smtp->code(), " ", $smtp->message();
$smtp->quit;
- or download this
$smtp->mail("postmaster\@mailserver.co.za", Size => 52428800);
if ( $smtp->status() =~ /^[45]$/ ) {
# informative error here
exit(1);
}
- or download this
if ( $smtp->status() =~ /^[45]$/ ) {
if ( $smtp->message() eq "size limit exceeded" ) {
...
print "The message is too big. Boo-hoo\n";
}
}