diff --git a/sendgrid/helpers/mail/mail.py b/sendgrid/helpers/mail/mail.py index 59d218b8d..fa73f6570 100644 --- a/sendgrid/helpers/mail/mail.py +++ b/sendgrid/helpers/mail/mail.py @@ -33,7 +33,7 @@ def __init__( self.add_content(content) def __str__(self): - self.get() + return str(self.get()) def get(self): """ diff --git a/test/test_mail.py b/test/test_mail.py index 0b0a781ea..058f07a5b 100644 --- a/test/test_mail.py +++ b/test/test_mail.py @@ -65,6 +65,8 @@ def test_helloEmail(self): '"subject": "Hello World from the SendGrid Python Library"}' ) + self.assertTrue(isinstance(str(mail), str)) + def test_kitchenSink(self): self.maxDiff = None