Hello folks.
I've been having real difficulty for a week now trying to get Website registration working properly.
Locally (using XAMPP connected to my work domain and mail exchange) I have no problems registering an account to my website and sending emails for registration. Crucially I can send to both hotmail and my work email address and both addresses receive these emails perfectly.
Unfortunately, when I attempt this online registration using my website, all registration emails to my work email address are blocked (whereas hotmail accepts them no problem)
I already have a ticket with the Hostpapa support team but it's taking an awfully long time for responses.
The rejection email is :
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
plight@mywork.com
SMTP error from remote mail server after end of data:
host mta1.mywork.com [91.121.43.66]: 550 Local Sender Policy Framework rule 3 violation
------ This is a copy of the message, including all the headers. ------
Return-path: <MyUser@hp95.hostpapa.com>
Received: from MyUser by hp95.hostpapa.com with local (Exim 4.69)
(envelope-from <MyUser@hp95.hostpapa.com>)
id 1RuiVy-0007LQ-Mh
for plight@mywork.com; Tue, 07 Feb 2012 10:43:10 +0000
To: plight@mywork.com
Subject: My Website Registration
From: webmaster@MyWebsite.com
Reply-To: webmaster@MyWebsite.com
Content-Type: text/html; ch#%$!t=ISO-8859-1
X-Mailer: PHP/5.3.8
Message-Id: <E1RuiVy-0007LQ-Mh@hp95.hostpapa.com>
Date: Tue, 07 Feb 2012 10:43:10 +0000
<p>Hi plight,</p><p>Thank you for registering with MyWebsite.com. The details you submitted were:</p><table width="100%">
<tr>
<td align="left" valign="top" style="width:50%">
<p>Forename: plight</p><p>Surname: plight</p><p>Date of birth: </p><p>Gender: Male</p><p>Biography: </p><p>Password: p</p>
</td>
<td align="left" valign="top" style="width:50%">
<p>House: </p><p>Address 1: </p><p>Address 2: </p><p>Town: </p><p>County: </p><p>Postcode: </p><p>Telephone: </p><p>E-mail: plight@mywork.com</p>
</td>
</tr>
</table><p>Please check back for regular updates and continue your support for us by visiting the site and donating if you can.</p>
<p>Kind Regards,</p>
<p>Pete and Andy</p>
The code used to generate this email is:
// success so display details and send email
$subject = "MyWebsite Registration";
$body1 = "<p>Hi ".safetext($uforn).",</p><p>Thank you for registering with MyWebsite.com. The details you submitted were:</p>";
$body2 = "<table width=\"100%\">
<tr>
<td align=\"left\" valign=\"top\" style=\"width:50%\">
<p>Forename: ".safetext($uforn)."</p><p>Surname: ".safetext($usurn)."</p><p>Date of birth: ".safetext($udob)."</p><p>Gender: ".safetext($usex)."</p><p>Biography: ".safetext($ubio)."</p>
</td>
<td align=\"left\" valign=\"top\" style=\"width:50%\">
<p>House: ".safetext($uhous)."</p><p>Address 1: ".safetext($uaddr1)."</p><p>Address 2: ".safetext($uaddr2)."</p><p>Town: ".safetext($utown)."</p><p>County: ".safetext($ucoun)."</p><p>Postcode: ".safetext($upost)."</p><p>Telephone: ".safetext($utele)."</p><p>E-mail: ".safetext($uemail)."</p>
</td>
</tr>
</table>";
$body3 = "<p>Before you log in you must complete registration by clicking the following link:<br /><br /><a href=\"".CurrPageURL()."?uactkey=".$uactkey."\" class=\"ulink\" onclick=\"window.open(this.href); return false;\">".CurrPageURL()."?uactkey=".$uactkey."</a><br /><br />If this is an error, ignore this email and you will be removed from our mailing list automatically.</p>
<p>Regards,</p>
<p>MyWebsite.com Team</p>";
$body = str_replace("\n.", "\n..", $body1.$body2.$body3);
addtag('h2','Registration complete');
addtag('p','Your details:');
addtag('',$body2);
$headers = 'From: webmaster@MyWebsite.com' . "\r\n" .
'Reply-To: webmaster@MyWebsite.com' . "\r\n" .
'Content-Type: text/html; ch#%$!t=ISO-8859-1'."\r\n".
'X-Mailer: PHP/' . phpversion();
if (mail($uemail, $subject, $body, $headers)) {
addtag('p',"An email has been sent to ".$_POST[email]." which requires activation. Please follow the instructions in this message to complete the activation of your account. If you don't receive an email after some time, check your Spam or Junk mail folders.");
} else {
//echo("<h2>The message below has failed to be sent</h2>".$subject.$body);
echo "<p>The message has failed to be sent. Please
<a href=\"mailto:webmaster@MyWebsite.com?
Subject=Registration%20email%20send%20error!\"
class=\"ulink\">contact us</a> for assistance</p>";
}
Thank you for your time to read this post and help as it is very much appreciated!
Let me know if you need any more information
Regards,
Pete