Skip to content

Commit 62d43ed

Browse files
shwetha-manvinkurkeShwetha Radhakrishna
and
Shwetha Radhakrishna
authored
chore: revert reply_to prop add in mail (sendgrid#1003)
Co-authored-by: Shwetha Radhakrishna <[email protected]>
1 parent 08f0670 commit 62d43ed

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

sendgrid/helpers/mail/mail.py

-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def __init__(
2424
self,
2525
from_email=None,
2626
to_emails=None,
27-
reply_to=None,
2827
subject=None,
2928
plain_text_content=None,
3029
html_content=None,
@@ -41,8 +40,6 @@ def __init__(
4140
:param to_emails: The email address of the recipient
4241
:type to_emails: To, str, tuple, list(str), list(tuple),
4342
list(To), optional
44-
:param reply_to: The email address to reply to
45-
:type reply_to: ReplyTo, tuple, optional
4643
:param plain_text_content: The plain text body of the email
4744
:type plain_text_content: string, optional
4845
:param html_content: The html body of the email
@@ -82,10 +79,6 @@ def __init__(
8279
if html_content is not None:
8380
self.add_content(html_content, MimeType.html)
8481

85-
# Optional
86-
if reply_to is not None:
87-
self.reply_to = reply_to
88-
8982
def __str__(self):
9083
"""A JSON-ready string representation of this Mail object.
9184

test/test_mail_helpers.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,12 @@ def test_batch_id(self):
9494

9595
# Send a Single Email to a Single Recipient
9696
def test_single_email_to_a_single_recipient(self):
97-
from sendgrid.helpers.mail import (Mail, From, To, ReplyTo, Subject,
97+
from sendgrid.helpers.mail import (Mail, From, To, Subject,
9898
PlainTextContent, HtmlContent)
9999
self.maxDiff = None
100100
message = Mail(
101101
from_email=From('[email protected]', 'Example From Name'),
102102
to_emails=To('[email protected]', 'Example To Name'),
103-
reply_to=ReplyTo('[email protected]', 'Example Reply To Name'),
104103
subject=Subject('Sending with SendGrid is Fun'),
105104
plain_text_content=PlainTextContent(
106105
'and easy to do anywhere, even with Python'),
@@ -124,10 +123,6 @@ def test_single_email_to_a_single_recipient(self):
124123
"email": "[email protected]",
125124
"name": "Example From Name"
126125
},
127-
"reply_to": {
128-
"email": "[email protected]",
129-
"name": "Example Reply To Name"
130-
},
131126
"personalizations": [
132127
{
133128
"to": [
@@ -660,7 +655,7 @@ def test_personalization_add_email_filters_out_duplicate_to_emails(self):
660655
p.add_email(to_email)
661656

662657
self.assertEqual([to_email.get()], p.tos)
663-
658+
664659
def test_personalization_add_email_filters_out_duplicate_to_emails_ignoring_case(self):
665660
self.maxDiff = None
666661

use_cases/send_a_single_email_to_a_single_recipient.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ from sendgrid.helpers.mail import Mail
66
message = Mail(
77
from_email='[email protected]',
88
to_emails='[email protected]',
9-
reply_to='[email protected]',
109
subject='Sending with Twilio SendGrid is Fun',
1110
html_content='<strong>and easy to do anywhere, even with Python</strong>')
1211
try:

0 commit comments

Comments
 (0)