HELP php mail()

Status
Not open for further replies.

ibtlalc43

New Member
Messages
2
Reaction score
0
Points
0
I am testing my register script but the mail function is not working.
here is the script I am using.

$to = $email;
$headers = "From: <admin@ibtlalc.co.cc>";
$subject = "Activate Your ibtlalc Account";
$server = "mail.ibtlalc.co.cc";

ini_set ('SMTP', $server);

$body="
Dear $name,

bla blah blah

Thank you again,
Scott Page";
$mail = mail($to, $subject, $body, $headers);
if ($mail){echo "yay";}

The script doesn't echo anything.

This script has worked in the past but it doesn't now. PLEASE HELP.

Please note, the $email value is set by the user.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
I see where you register at your site. Something must be broken in the script, though. I see a line of php code displayed right above the place to register. Please recheck your code there.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Your index page is .html

The servers a x10hosting do not parse .html files as PHP.

The file has to have extension of .php to work on x10hosting.
 
Status
Not open for further replies.
Top