Skip to content

Commit bc01d56

Browse files
committed
Add sentFrom to MessageCreateOptions ctor
1 parent eda28a3 commit bc01d56

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

mailosaur/models/attachment.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ def __init__(self, data=None):
3333
self.length = data.get('length', None)
3434
self.url = data.get('url', None)
3535

36-
# You can optionally declare instance variables in the class body
37-
text2: str
38-
3936
def to_json(self):
4037
return {
4138
'contentType': self.content_type,

mailosaur/models/message_create_options.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ class MessageCreateOptions(object):
66
77
:param to: The email address to which the email will be sent. Must be a verified email address.
88
:type to: str
9-
:param sendFrom: Allows for the partial override of the message's 'from' address. This **must** be an
10-
address ending with `YOUR_SERVER.mailosaur.net`, such as `my-emails@a1bcdef2.mailosaur.net`.
11-
:type sendFrom: str
129
:param send: If true, email will be sent upon creation.
1310
:type send: bool
1411
:param subject: The email subject line.
@@ -19,16 +16,19 @@ class MessageCreateOptions(object):
1916
:type html: str
2017
:param attachments: Any message attachments.
2118
:type attachments: list[~mailosaur.models.Attachment]
19+
:param sendFrom: Allows for the partial override of the message's 'from' address. This **must** be an
20+
address ending with `YOUR_SERVER.mailosaur.net`, such as `my-emails@a1bcdef2.mailosaur.net`.
21+
:type sendFrom: str
2222
"""
2323

24-
def __init__(self, to, send, subject, text=None, html=None, attachments=None):
24+
def __init__(self, to, send, subject, text=None, html=None, attachments=None, sendFrom=None):
2525
self.to = to
26-
self.sendFrom = None
2726
self.send = send
2827
self.subject = subject
2928
self.text = text
3029
self.html = html
3130
self.attachments = attachments
31+
self.sendFrom = sendFrom
3232

3333
def to_json(self):
3434
attachments = []

0 commit comments

Comments
 (0)