Sisimai::SMTP::Reply(3pm)

Sisimai::SMTP::Reply3pm

Smtp reply code related class

Usage

    use Sisimai::SMTP::Reply;
    print Sisimai::SMTP::Reply->find('550 5.1.1 Unknown user');  # 550

Overview

"Sisimai::SMTP::Reply" is a utility class for getting the SMTP reply code value from given error message text.

Class methods

"test(D.S.N.)"

test() method checks whether the reply code is a valid code or not.

    print Sisimai::SMTP::Reply->test('521');    # 1
    print Sisimai::SMTP::Reply->test('386');    # 0
    print Sisimai::SMTP::Reply->test('101');    # 0
    print Sisimai::SMTP::Reply->test('640');    # 0

"find(String)"

find() method returns the SMTP reply code value.

    print Sisimai::SMTP::Reply->find('5.0.0');                  # ''
    print Sisimai::SMTP::Reply->find('550 5.1.1 User unknown'); # 550
    print Sisimai::SMTP::Reply->find('421 Delivery Expired');   # 421

"associatedwith(String)"

associatedwith() method returns a list related to the SMTP reply code in the argument

    print Sisimai::SMTP::Reply->associatedwith("556"); # ["RCPT", "", "notaccept"]
    print Sisimai::SMTP::Reply->associatedwith("421"); # []

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

azumakuniyuki

License

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

From libsisimai-perl 5.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.