Sisimai::Reason::HasMoved(3pm)

NAME
Sisimai::Reason::HasMoved - Bounce reason is "hasmoved" or not.

SYNOPSIS
    use Sisimai::Reason::HasMoved;
    print Sisimai::Reason::HasMoved->match('address neko@example.jp has been replaced by ...');   # 1

DESCRIPTION
"Sisimai::Reason::HasMoved" checks the bounce reason is "hasmoved" or not. This class is called only "Sisimai::Reason" class.

This is the error that the user's mailbox has moved (and is not forwarded automatically). Sisimai will set "hasmoved" to the reason of the email bounce if the value of the "Status:" field in the bounce email is 5.1.6.

    <kijitora@example.go.jp>: host mx1.example.go.jp[192.0.2.127] said: 550 5.1.6 recipient
        no longer on server: kijitora@example.go.jp (in reply to RCPT TO command)

CLASS METHODS

  "text()"
text() method returns the fixed string "hasmoved".

    print Sisimai::Reason::HasMoved->text;  # hasmoved

  "match(string)"
match() method returns 1 if the argument matched with patterns defined in this class.

    print Sisimai::Reason::HasMoved->match('address cat@example.jp has been replaced by ');   # 1

  "true(Sisimai::Fact)"
true() method returns 1 if the bounce reason is "hasmoved". The argument must be "Sisimai::Fact" object and this method is called only from "Sisimai::Reason" class.

AUTHOR
azumakuniyuki

COPYRIGHT
Copyright (C) 2015-2016,2018,2020,2021,2024-2026 azumakuniyuki, All rights reserved.

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