From 0a41ea458a46cb2f5dd487a8e879303bc2fa2a85 Mon Sep 17 00:00:00 2001 From: Nino Date: Mon, 19 Feb 2018 00:04:50 +0100 Subject: [PATCH] Ensure params are applied independently --- sendgrid/helpers/mail/mail.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sendgrid/helpers/mail/mail.py b/sendgrid/helpers/mail/mail.py index 116afb46e..7e28fc965 100644 --- a/sendgrid/helpers/mail/mail.py +++ b/sendgrid/helpers/mail/mail.py @@ -41,12 +41,18 @@ def __init__( self._custom_args = [] # Minimum required to send an email - if from_email and subject and to_email and content: + if from_email: self.from_email = from_email + + if subject: self.subject = subject + + if to_email: personalization = Personalization() personalization.add_to(to_email) self.add_personalization(personalization) + + if content: self.add_content(content) def __str__(self):