Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emails, a different 'reply to' address than sender address

I have a contact form on a website (a general form: name, email, subject, message) in which mails are sent using google apps smtp to the admins.
Currently if an administrator wants to reply to the mail directly selecting the reply option, the person's reply's To field will be filled by the sender's address automatically.

What I wan't to ask is, Is there any standardized way to pass on some additional info with the mail which would define any reply to the mail should go to this address instead of the sender's?

It does seems that there is a little chance for this option as it may lead to some problems due to spammers (They may define a custom reply field in their mail and a general user might not look where they are replying).

So as an alternative what I thought is to find a way to create a filter with sender's account which figures out the reply email address from the format and forwards the mail (Doesn't seems like a good solution and I have no idea how to achieve this).

I have tagged django, though this is not directly related with this, as I will finally implement this through django.

like image 431
crodjer Avatar asked Jan 05 '11 04:01

crodjer


People also ask

Why does the email address change when I reply?

It is possible that you have configured your account's default Reply-to address to the email address that you have provided. If you can't remember doing this, it is possible that your computer system has been corrupted resulting in compromising your account such as viruses and/or malwares.

Can you reply to an email with a different address?

In the "Send mail as" section, click Edit info next to your email address. Click Specify a different "reply to" address.

How do I change my reply to address in Gmail?

Setting the Reply-To in Gmail is easy. Go to Gmail Settings, then Accounts, and click edit info next to the email address whose Reply-To you want to set: Then click the “Specify…” link. Enter in the address, and hit Save Changes.


1 Answers

There are in fact standardized headers to specify response headers: http://cr.yp.to/immhf/response.html.

As far as implementing this in Django is concerned, the documentation contains an example:

from django.core.mail import EmailMessage

email = EmailMessage(
    'Hello', # email subject
    'Body goes here', # email body
    '[email protected]', # sender address
    ['[email protected]', '[email protected]'],
    ['[email protected]'],
    headers={'Reply-To': '[email protected]'},
)

This solved my problem.

like image 60
crodjer Avatar answered Sep 28 '22 14:09

crodjer