Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending an email to myself but letting me reply back to another email

I'm sending an email to myself using a module (nodemailer) on my web application's platform (node.js) from someone using my web app's contact page. Since, I'm sending an email to myself, if I reply to the email, I'll be sending an email to myself again, and not sending it to the email in the "from" header that's set in the email's header. How could I let clients (gmail, yahoo, etc) know which email should be replied to?

I'm using Nodemailer module for Node.js to do the sending from a Ubuntu Linux server.

like image 545
Sam Avatar asked May 15 '13 22:05

Sam


2 Answers

Usually adding a Reply-To: header will be sufficient for indicating which address replies should be sent to.

like image 67
tadman Avatar answered Sep 27 '22 21:09

tadman


I had exactly the same problem and found the solution in this StackOverflow thread, which pointed to this forum:

If the "From" address is either the same as the "To" address, or is configured in GMail Settings as one of the 'Send As...' accounts, Gmail replies to the "To" address instead of the "Reply-To" address. An easy workaround is to specify a non-Gmail "From" address

I wasted quite a bit of time before finding the solution. Hope this helps out other people.

like image 41
Wissam Avatar answered Sep 27 '22 22:09

Wissam