NAME

Sisimai::SMTP - SMTP Status Codes related utilities

SYNOPSIS

use Sisimai::SMTP;
print Sisimai::SMTP->is_softbounce('SMTP error message');

DESCRIPTION

Sisimai::SMTP is a parent class of Sisimai::SMTP::Status and Sisimai::SMTP::Reply.

CLASS METHODS

is_softbounce(String)

is_softbounce() returns 1 if the string includes SMTP reply code like 421, 550 or SMTP status code like 5.1.1, 4.4.7. The return value is 1: soft bounce, 0: hard bounce, -1: did not find information to decide that it is a soft bounce or a hard bounce.

print Sisimai::SMTP->is_softbounce('422 Temporary rejected');    # 1
print Sisimai::SMTP->is_softbounce('550 User unknown');          # 0
print Sisimai::SMTP->is_softbounce('200 OK');                    # -1 
print Sisimai::SMTP->is_softbounce('4.4.7 Delivery expired');    # 1 
print Sisimai::SMTP->is_softbounce('Permanent failure');         # 0 

AUTHOR

azumakuniyuki

COPYRIGHT

Copyright (C) 2015 azumakuniyuki, All rights reserved.

LICENSE

This software is distributed under The BSD 2-Clause License.