I am using gmail smtp in my django website. I have a contact form where user put email and message then I send a mail to the admin with :
email = EmailMessage('email subject', 'email message', settings.EMAIL_HOST_USER,
['admin.mysite@gmail.com'],
headers = {'Reply-To': 'user@foo.bar',
'Sender': 'user@foo.bar','from': 'user@foo.bar','Return-Path': 'user@foo.bar'})
email.send(fail_silently=False)
email is sent/received correctly but when admin client select reply in gmail, it always reply to the settings.EMAIL_HOST_USER and not the user address. On the email original header the From and Return-path are set with the setting.EMAIL_HOST_USER