Issue Summary
Current implementation restrict use default email_from behavior. For more info please see https://tools.ietf.org/html/rfc2822#section-3.4
Steps to Reproduce
When user try to create Email instance from https://github.com/sendgrid/sendgrid-python/blob/master/sendgrid/helpers/mail/mail.py#L173-L179 . You must specify
from_email and from_name as seperate parametrs
def get(self):
email = {}
if self.name != None:
email["name"] = self.name
if self.email != None:
email["email"] = self.email
return email
from_email = Email("test@example.com", "Example Name")
As a result client should split from_email:
try:
import rfc822
except ImportError:
import email.utils as rfc822
from_name, from_email = rfc822.parseaddr(email.from_email)
# Python sendgrid client should improve
# sendgrid/helpers/mail/mail.py:164
if not from_name:
from_name = None
Mail(from_email, from_name)
Proposal to how to improve this bahaviour.
Because if user now create Email from:
from_email = Email("Andrii Soldatenko <hello@asoldatenko.com>")
Actual result:
Technical details:
sendgrid-python Version: master
Python Version: all
References:
NOTE:
In sengrid-python==1.4 this feature is working
Reactions are currently unavailable
Issue Summary
Current implementation restrict use default
email_frombehavior. For more info please see https://tools.ietf.org/html/rfc2822#section-3.4Steps to Reproduce
Emailinstance from https://github.com/sendgrid/sendgrid-python/blob/master/sendgrid/helpers/mail/mail.py#L173-L179. You must specifyfrom_emailandfrom_nameas seperate parametrsAs a result client should split
from_email:Proposal to how to improve this bahaviour.
Because if user now create
Emailfrom:Actual result:

Technical details:
References:
NOTE:
In
sengrid-python==1.4this feature is working