Module: Sisimai::Rhost::Outlook
- Defined in:
- lib/sisimai/rhost/outlook.rb
Overview
Sisimai::Rhost detects the bounce reason from the content of Sisimai::Fact object as an argument of find() method when the value of “rhost” of the object is “*.hotmail.com”. This class is called only from Sisimai::Fact class.
Constant Summary collapse
- MessagesOf =
{ "hostunknown" => ["The mail could not be delivered to the recipient because the domain is not reachable"], "userunknown" => ["Requested action not taken: mailbox unavailable"], }.freeze
Class Method Summary collapse
-
.find(argvs) ⇒ String
Detect bounce reason from Microsoft Outlook.com: www.outlook.com/.
Class Method Details
.find(argvs) ⇒ String
Detect bounce reason from Microsoft Outlook.com: www.outlook.com/
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/sisimai/rhost/outlook.rb', line 17 def find(argvs) return "" if argvs["diagnosticcode"].empty? issuedcode = argvs["diagnosticcode"] reasontext = "" MessagesOf.each_key do |e| # Try to match the error message with message patterns defined in $MessagesOf next if MessagesOf[e].none? { |a| issuedcode.include?(a) } reasontext = e break end return reasontext end |