module Sisimai::Reason::Suspend
Sisimai::Reason::Suspend
checks the bounce reason is C<suspend> or not. This class is called only Sisimai::Reason
class.
This is the error that a recipient account is being suspended due to unpaid or other reasons.
Constants
- Index
Public Class Methods
description()
click to toggle source
# File lib/sisimai/reason/suspend.rb, line 31 def description; return 'Email rejected due to a recipient account is being suspended'; end
match(argv1)
click to toggle source
Try to match that the given text and regular expressions @param [String] argv1 String
to be matched with regular expressions @return [True,False] false: Did not match
true: Matched
# File lib/sisimai/reason/suspend.rb, line 37 def match(argv1) return nil unless argv1 return true if Index.any? { |a| argv1.include?(a) } return false end
text()
click to toggle source
# File lib/sisimai/reason/suspend.rb, line 30 def text; return 'suspend'; end
true(argvs)
click to toggle source
The envelope recipient's mailbox is suspended or not @param [Sisimai::Data] argvs Object to be detected the reason @return [True,False] true: is mailbox suspended
false: is not suspended
@see www.ietf.org/rfc/rfc2822.txt
# File lib/sisimai/reason/suspend.rb, line 48 def true(argvs) return nil if argvs.deliverystatus.empty? return true if argvs.reason == 'suspend' return true if match(argvs.diagnosticcode.downcase) return false end