Class: Mailosaur::Models::MessageCreateOptions
- Defined in:
- lib/Mailosaur/models/message_create_options.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Array<Attachment>
Any message attachments.
-
#from ⇒ String
‘from’ address.
-
#html ⇒ String
or html can be supplied, not both.
-
#send ⇒ Boolean
If true, email will be sent upon creation.
-
#subject ⇒ String
The email subject line.
-
#text ⇒ String
text or html can be supplied, not both.
-
#to ⇒ String
Must be a verified email address.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ MessageCreateOptions
constructor
A new instance of MessageCreateOptions.
Methods inherited from BaseModel
Constructor Details
#initialize(data = {}) ⇒ MessageCreateOptions
Returns a new instance of MessageCreateOptions.
4 5 6 7 8 9 10 11 12 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 4 def initialize(data = {}) @to = data['to'] @from = data['from'] @send = data['send'] @subject = data['subject'] @text = data['text'] @html = data['html'] @attachments = data['attachments'] end |
Instance Attribute Details
#attachments ⇒ Array<Attachment>
Returns Any message attachments.
38 39 40 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 38 def @attachments end |
#from ⇒ String
‘from’ address. This must be an address ending with ‘YOUR_SERVER.mailosaur.net`, such as `[email protected]`.
21 22 23 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 21 def from @from end |
#html ⇒ String
or html can be supplied, not both.
35 36 37 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 35 def html @html end |
#send ⇒ Boolean
Returns If true, email will be sent upon creation.
24 25 26 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 24 def send @send end |
#subject ⇒ String
Returns The email subject line.
27 28 29 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 27 def subject @subject end |
#text ⇒ String
text or html can be supplied, not both.
31 32 33 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 31 def text @text end |
#to ⇒ String
Must be a verified email address.
16 17 18 |
# File 'lib/Mailosaur/models/message_create_options.rb', line 16 def to @to end |