Class: Mailkube::Events::FailureContext
- Inherits:
-
DeliveryContext
- Object
- Node
- DeliveryContext
- Mailkube::Events::FailureContext
- Defined in:
- lib/mailkube/events/contexts.rb,
sig/mailkube/events/contexts.rbs
Overview
A delivery failure, carrying the receiving server's verdict.
Subclasses DeliveryContext because it mirrors the server's own serializer inheritance: a failure is a delivery outcome plus a reason.
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#code ⇒ Integer
The SMTP status code the receiving server returned.
-
#reason ⇒ String
Server-controlled, and deliberately a plain String: a closed set would turn a reason added later into a parse error on an already-released client.
Methods inherited from DeliveryContext
Methods inherited from Node
#==, #[], #block, #hash, #initialize, #to_h
Constructor Details
This class inherits a constructor from Mailkube::Events::Node
Instance Method Details
#code ⇒ Integer
Returns the SMTP status code the receiving server returned.
54 55 56 57 |
# File 'lib/mailkube/events/contexts.rb', line 54 def code = self["code"] # Server-controlled, and deliberately a plain String: a closed set would turn a reason added # later into a parse error on an already-released client. # @return [String] the failure reason. |
#reason ⇒ String
Server-controlled, and deliberately a plain String: a closed set would turn a reason added later into a parse error on an already-released client.
58 |
# File 'lib/mailkube/events/contexts.rb', line 58 def reason = self["reason"] |