Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p01-contact : simply add contact forms in your pages
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.
ToConfusedomename@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.
Reply


Messages In This Thread
RE: p01-contact : simply add contact forms in your pages - by klaypigeon - 2013-11-18, 12:11:02
askcopy syntax Not Working - by celextel - 2019-05-24, 01:54:40
RE: askcopy syntax Not Working - by celextel - 2019-05-28, 01:51:47



Users browsing this thread: 2 Guest(s)