module Sisimai::Reason::OnHold

Sisimai::Reason::OnHold checks the bounce reason is “onhold” or not. This class is called only Sisimai::Reason class.

Sisimai will set C<onhold> to the reason of email bounce if there is no (or less) detailed information about email bounce for judging the reason.

Public Class Methods

description() click to toggle source
# File lib/sisimai/reason/onhold.rb, line 12
def description; return 'Sisimai could not decided the reason due to there is no (or less) detailed information for judging the reason'; 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/onhold.rb, line 18
def match(_argv1)
  return false
end
text() click to toggle source
# File lib/sisimai/reason/onhold.rb, line 11
def text; return 'onhold'; end
true(argvs) click to toggle source

On hold, Could not decide the bounce reason… @param [Sisimai::Data] argvs Object to be detected the reason @return [True,False] true: Status code is “onhold”

false: is not "onhold"

@see www.ietf.org/rfc/rfc2822.txt

# File lib/sisimai/reason/onhold.rb, line 27
def true(argvs)
  return nil  if argvs.deliverystatus.empty?
  return true if argvs.reason == 'onhold'
  return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'onhold'
  return false
end