Class: Nylas::RawMessage
- Inherits:
-
Object
- Object
- Nylas::RawMessage
- Defined in:
- lib/nylas/raw_message.rb
Overview
Allows sending of email with nylas from an rfc822 compatible string
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#mime_compatible_string ⇒ Object
Returns the value of attribute mime_compatible_string.
Instance Method Summary collapse
-
#initialize(mime_compatible_string, api:) ⇒ RawMessage
constructor
A new instance of RawMessage.
- #send! ⇒ Object
Constructor Details
#initialize(mime_compatible_string, api:) ⇒ RawMessage
Returns a new instance of RawMessage.
8 9 10 11 |
# File 'lib/nylas/raw_message.rb', line 8 def initialize(mime_compatible_string, api:) self.api = api self.mime_compatible_string = mime_compatible_string end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
6 7 8 |
# File 'lib/nylas/raw_message.rb', line 6 def api @api end |
#mime_compatible_string ⇒ Object
Returns the value of attribute mime_compatible_string.
6 7 8 |
# File 'lib/nylas/raw_message.rb', line 6 def mime_compatible_string @mime_compatible_string end |
Instance Method Details
#send! ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/nylas/raw_message.rb', line 13 def send! Message.new(**api.execute( method: :post, path: "/send", payload: mime_compatible_string, headers: HEADERS ).merge(api: api)) end |