I have errors when I use reply_to, here is what I've tried...
This works but without reply_to :
mail = Mail(
from_email = from_email,
to_emails = to_email,
subject = subject,
html_content = content)
response = sg.client.mail.send.post(request_body=mail.get())
And I've tried this :
mail = Mail(
reply_to = reply,
from_email = from_email,
to_emails = to_email,
subject = subject,
html_content = content)
response = sg.client.mail.send.post(request_body=mail.get())
This thows :
TypeError: init() got an unexpected keyword argument 'reply_to'
I have also tried to add this after Mail() :
mail.from_EmailMessage(reply_to=ReplyTo(Email(email=ANS_EMAIL,name='Mr X')))
Which throws :
TypeError: object of type 'Email' has no len()
And :
mail.reply_to(ReplyTo(email=ANS_EMAIL,name='Mr X'))
Which throws :
TypeError: 'NoneType' object is not callable
Any help please ?