Skip to content

Commit

Permalink
Add sentFrom to MessageCreateOptions ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-mailosaur committed Mar 14, 2023
1 parent eda28a3 commit bc01d56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions mailosaur/models/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def __init__(self, data=None):
self.length = data.get('length', None)
self.url = data.get('url', None)

# You can optionally declare instance variables in the class body
text2: str

def to_json(self):
return {
'contentType': self.content_type,
Expand Down
10 changes: 5 additions & 5 deletions mailosaur/models/message_create_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ class MessageCreateOptions(object):
:param to: The email address to which the email will be sent. Must be a verified email address.
:type to: str
:param sendFrom: Allows for the partial override of the message's 'from' address. This **must** be an
address ending with `YOUR_SERVER.mailosaur.net`, such as `[email protected]`.
:type sendFrom: str
:param send: If true, email will be sent upon creation.
:type send: bool
:param subject: The email subject line.
Expand All @@ -19,16 +16,19 @@ class MessageCreateOptions(object):
:type html: str
:param attachments: Any message attachments.
:type attachments: list[~mailosaur.models.Attachment]
:param sendFrom: Allows for the partial override of the message's 'from' address. This **must** be an
address ending with `YOUR_SERVER.mailosaur.net`, such as `[email protected]`.
:type sendFrom: str
"""

def __init__(self, to, send, subject, text=None, html=None, attachments=None):
def __init__(self, to, send, subject, text=None, html=None, attachments=None, sendFrom=None):
self.to = to
self.sendFrom = None
self.send = send
self.subject = subject
self.text = text
self.html = html
self.attachments = attachments
self.sendFrom = sendFrom

def to_json(self):
attachments = []
Expand Down

0 comments on commit bc01d56

Please sign in to comment.