jeddi
02-24-2008, 02:56 PM
I have been trying to use the following code to send an email out after someone fills in a form:
/*
* make MESSAGE
*/
$messageX = "testing";
/*
* send MESSAGE
*/
// multiple recipients
$to = $N_email;
// subject
$subject = "As Promised ...Your Free Access to LETS GET STARTED.";
// To send HTML mail, the Content-type header must be set
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";
// Additional headers
$headers .= "From: Lets-Get-Started. <Admin@lets-get-started.net> \r\n";
// Mail it
mail($to, $subject, $messageX, $headers);
echo "To: $to, Subject: $subject, Headers: $headers, Message: $messageX";
if (mail($to, $subject, $messageX, $headers) == false)
{
echo "Email failed";
}
?>
Is there anything wrong with code ?
The code does not error - but just does not send anything
The result from the echo stmt:is :
To: kevin@intaccs.com,
Subject: As Promised ...Your Free Access to LETS GET STARTED.,
Headers: MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1
From: Lets-Get-Started. ,
Message: test
Well I cant see anything wrong.
The "if / false" does not echo anything
Is there something I should check with my hosting account ?
I have a shared hosting and have access to cPanel and even the WHM ( I have a reseller account)
Thanks again for any help
/*
* make MESSAGE
*/
$messageX = "testing";
/*
* send MESSAGE
*/
// multiple recipients
$to = $N_email;
// subject
$subject = "As Promised ...Your Free Access to LETS GET STARTED.";
// To send HTML mail, the Content-type header must be set
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";
// Additional headers
$headers .= "From: Lets-Get-Started. <Admin@lets-get-started.net> \r\n";
// Mail it
mail($to, $subject, $messageX, $headers);
echo "To: $to, Subject: $subject, Headers: $headers, Message: $messageX";
if (mail($to, $subject, $messageX, $headers) == false)
{
echo "Email failed";
}
?>
Is there anything wrong with code ?
The code does not error - but just does not send anything
The result from the echo stmt:is :
To: kevin@intaccs.com,
Subject: As Promised ...Your Free Access to LETS GET STARTED.,
Headers: MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1
From: Lets-Get-Started. ,
Message: test
Well I cant see anything wrong.
The "if / false" does not echo anything
Is there something I should check with my hosting account ?
I have a shared hosting and have access to cPanel and even the WHM ( I have a reseller account)
Thanks again for any help