module Sisimai::Rhost::KDDI

Sisimai::Rhost detects the bounce reason from the content of Sisimai::Data object as an argument of get() method when the value of “rhost” of the object is “lsean.ezweb.ne.jp” or “msmx.au.com”. This class is called only Sisimai::Data class.

Constants

MessagesOf

Imported from p5-Sisimail/lib/Sisimai/Rhost/KDDI.pm

Public Class Methods

get(argvs) click to toggle source

Detect bounce reason from au (KDDI) @param [Sisimai::Data] argvs Parsed email object @return [String] The bounce reason for au.com or ezweb.ne.jp

# File lib/sisimai/rhost/kddi.rb, line 18
def get(argvs)
  statusmesg = argvs.diagnosticcode
  reasontext = ''

  MessagesOf.each_key do |e|
    # Try to match the error message with message patterns defined in $MessagesOf
    next unless statusmesg.end_with?(MessagesOf[e])
    reasontext = e
    break
  end

  return reasontext
end