Module: Sisimai::Reason::OnHold

Defined in:
lib/sisimai/reason/onhold.rb

Overview

Sisimai::Reason::OnHold checks the bounce reason is “onhold” or not. This class is called only Sisimai::Reason class. Sisimai will set “onhold” to the reason of email bounce if there is no (or less) detailed information about email bounce for judging the reason.

Class Method Summary collapse

Class Method Details

.descriptionObject



9
# File 'lib/sisimai/reason/onhold.rb', line 9

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) ⇒ Boolean

Try to match that the given text and regular expressions

Parameters:

  • argv1 (String)

    String to be matched with regular expressions

Returns:

  • (Boolean)

    false: Did not match, true: Matched



14
# File 'lib/sisimai/reason/onhold.rb', line 14

def match(_argv1); return false; end

.textObject



8
# File 'lib/sisimai/reason/onhold.rb', line 8

def text; return 'onhold'; end

.true(argvs) ⇒ Boolean

On hold, Could not decide the bounce reason…

Parameters:

Returns:

  • (Boolean)

    true: Status code is “onhold” false: is not “onhold”

See Also:



21
22
23
24
25
26
# File 'lib/sisimai/reason/onhold.rb', line 21

def true(argvs)
  return false if argvs['deliverystatus'].empty?
  return true  if argvs['reason'] == 'onhold'
  return true  if Sisimai::SMTP::Status.name(argvs['deliverystatus']) == 'onhold'
  return false
end