freecrm
New Member
- Messages
- 629
- Reaction score
- 0
- Points
- 0
This may be a very daft question, but it appears as though some of the people wanting to register on my site (www.freecrm.x10hosting.com) are not validating their application.
On submitting initial info, it sends (php mail) info to the e-mail submitted in the form.
On checking my failed mail, I get a "malformed recipient address".
Could someone have a quick look over this to see if I've got something horribly wrong?
Variables:
$firstname - just a posted text value
$lastname - another posted text value
$contactemail - the submitted e-mail address
I've checked and checked this and it works fine in gmail, but something must be wrong.
Any ideas?
On submitting initial info, it sends (php mail) info to the e-mail submitted in the form.
On checking my failed mail, I get a "malformed recipient address".
A message that you sent contained one or more recipient addresses that were
incorrectly constructed:
<>: missing or malformed local part
This could be down to 2 things - either browsers are delibertaely putting in a false e-mail address (which should have been verified on the registration page!) or my code is duff.incorrectly constructed:
<>: missing or malformed local part
Could someone have a quick look over this to see if I've got something horribly wrong?
PHP:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= 'From: CRM Administrator <webmaster@freecrm.x10hosting.com>' . "\r\n";
$headers .= 'Reply-To: webmaster@freecrm.x10hosting.com' . "\r\n";
$headers .= 'X-Mailers: PHP /'.phpversion() . "\r\n";
$subject = "CRM, The Free Solution : Account Verification";
$message = 'message content.. blah de blah';
ini_set(sendmail_from,'webmaster@freecrm.x10hosting.com');//to correct from bug
if (@mail(''.$firstname.' '.$lastname.'<'.$contactemail.'>',stripslashes($subject),stripslashes($message),stripslashes($headers)))
{
echo ('
<p>Verification e-mail successfully sent to '. $contactemail . '</p>
');
}
else
{
echo ('
<p>Error! The verification e-mail has failed to send to ' . $contactemail . '. Please try again.</p>
');
}
Variables:
$firstname - just a posted text value
$lastname - another posted text value
$contactemail - the submitted e-mail address
I've checked and checked this and it works fine in gmail, but something must be wrong.
Any ideas?