Hello,
I run a site which requires e-mail validation for users to join. The problem is that some of the validation e-mails are not reaching the new members because return-path address does not exist.
In the PHP script that sends the e-mail, I set the FROM address to "auto_mail@domain.com", but in the header of the sent e-mail, the return-path is set as "nobody@server.master.com". Because "nobody@server.master.com" is not a real e-mail address, the mails are bounced back as I assume spam. Or the receiving server sees it as trying to spoof or fake the sender address.
Is there some way when sending mail with PHP to make the "return-path" use the proper FROM address that is set in the script?
Thank you for any and all help!!
Note:
master.com - is my master domain for my hosting account.
domain.com - is one domain/site on my hosting account.
xxxxx.com - is the recipients domain.
The header with incorrect "return-path":
Return-path: <nobody@server.master.com>
Envelope-to: [email]user@xxxxx.com[/email]
Delivery-date: Thu, 23 Jun 2005 12:13:03 -0400
Received: from nobody by server.master.com with local (Exim 4.50)
id 1DlUK6-0000Vt-Pp
for [email]user@xxxxx.com[/email]; Thu, 23 Jun 2005 12:13:03 -0400
To: [email]user@xxxxx.com[/email]
Subject: Domain.com - Please Confirm Membership
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
From: Domain.com <auto_mail@domain.com>
Message-Id: <E1DlUK6-0000Vt-Pp@server.master.com>
Date: Thu, 23 Jun 2005 12:13:02 -0400
The PHP script sending the e-mail:
$mailemail = htmlentities(stripslashes($user_email));
$mailusername = htmlentities(stripslashes($user_name));
$mailpassword = htmlentities(stripslashes($user_password));
$mailconfirm = $sv_user_confirm;
$mailconfirmby = htmlentities(date('g:i a, M jS',strtotime($sv_user_confirmby)));
/* recipients */
$to = "$mailemail";
$subject = "Domain.com - Please Confirm Membership";
/* message */
$message = "Message here...";
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: Domain.com <auto_mail@domain.com>\r\n";
$headers .= "Bcc: ";
/* and now mail it */
mail($to, $subject, $message, $headers);