From 2592b537f5592961324ec9fd8065f7f5785ed010 Mon Sep 17 00:00:00 2001 From: Jon M Date: Tue, 6 Sep 2022 12:54:47 +0100 Subject: [PATCH] Add 'from' support to MessageCreateOptions --- lib/Mailosaur/models/message_create_options.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Mailosaur/models/message_create_options.rb b/lib/Mailosaur/models/message_create_options.rb index c40cbcc..e5fac80 100644 --- a/lib/Mailosaur/models/message_create_options.rb +++ b/lib/Mailosaur/models/message_create_options.rb @@ -3,6 +3,7 @@ module Models class MessageCreateOptions < BaseModel def initialize(data = {}) @to = data['to'] + @from = data['from'] @send = data['send'] @subject = data['subject'] @text = data['text'] @@ -14,6 +15,11 @@ def initialize(data = {}) # Must be a verified email address. attr_accessor :to + # @return [String] Allows for the partial override of the message's + # 'from' address. This **must** be an address ending with + # `YOUR_SERVER.mailosaur.net`, such as `my-emails@a1bcdef2.mailosaur.net`. + attr_accessor :from + # @return [Boolean] If true, email will be sent upon creation. attr_accessor :send