2013-11-18, 12:11:02
(This post was last modified: 2013-11-20, 12:23:28 by klaypigeon.)
Hi,
The form is working as expected but I have an issue. All the email sent to me ends up in my spam folder on gmail. It comes from my domain with a from address that is not my domain so google flags it. Is there a way to have the senders email address become the "reply to" header, and make the senders "From" header become admin@mydomainName.com?
This is just a test where I sent a message to myself.
Toomename@gmail.com
X-PHP-Originating-Script: 0:p01-contact.php
From: Theo <somename@gmail.com>
Reply-To: Theo <somename@gmail.com>
What I would like to try is this, see if google will allow this:
To: somename@gmail.com
X-PHP-Originating-Script: 0:p01-contact.php
From: Admin<admin@mydomain.com>
Reply-To: Theo <somename@gmail.com>
Update:
I was able to get it working by changing the following lines:
I then marked the email as 'Not Spam' in gmail and added the sender www-data@mydomain.com to my contacts. When I reply, it still goes to the correct email as it was intended to.
The form is working as expected but I have an issue. All the email sent to me ends up in my spam folder on gmail. It comes from my domain with a from address that is not my domain so google flags it. Is there a way to have the senders email address become the "reply to" header, and make the senders "From" header become admin@mydomainName.com?
This is just a test where I sent a message to myself.
Toomename@gmail.com
X-PHP-Originating-Script: 0:p01-contact.php
From: Theo <somename@gmail.com>
Reply-To: Theo <somename@gmail.com>
What I would like to try is this, see if google will allow this:
To: somename@gmail.com
X-PHP-Originating-Script: 0:p01-contact.php
From: Admin<admin@mydomain.com>
Reply-To: Theo <somename@gmail.com>
Update:
I was able to get it working by changing the following lines:
Code:
$a_name = 'Admin';
$a_email = 'www-data@mydomain.com'; (this was the actual value when I inspected the incoming header)
// $headers = "From: $name <$email>\r\n";
$headers = "From: $a_name <$a_email>\r\n";
$headers .= "Return-Path: $a_name <$a_email>\r\n";
I then marked the email as 'Not Spam' in gmail and added the sender www-data@mydomain.com to my contacts. When I reply, it still goes to the correct email as it was intended to.