Page 1 of 1

PHP mail on godaddy

Posted: Sun Jan 31, 2010 5:37 pm
by Breck24
I'm on a linux server using php. Any idea why I'm not receiving email with this code


{
$to = '$_POST[stdEmail_T]';
$message = 'Dear '.'$_POST[stdFName_T]'.'\nThank you for submitting..an email has been sent to '.'$_POST[stdEmail_T]';
$subject = 'Thank you';
ini_set("SMTP","relay-hosting.secureserver.net");
$headers = 'From: xxxx@nnnn.org' . "\r\n" .
'Reply-To: xxxx@nnnn.org' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

$sent =mail($to, $subject, $message, $headers);

if($sent)
{
echo
"<body>
<p>Dear '$_POST[stdFName_T]',</p>

Re: PHP mail on godaddy

Posted: Sun Jan 31, 2010 7:01 pm
by JakeJ
Other than the fact that you seem to be missing some closing quotes, I don't see a problem although that might have just been from a bad cut and past job. Authentication could be the problem also, check your user name and password, it's likely that with godaddy, you need to authenticate to send.