PHP Mail Code Problem

Status
Not open for further replies.

Swiblet

New Member
Messages
1,114
Reaction score
0
Points
0
Okiedokie, I made a mail/form request PHP and it worked before. Then I stopped using it for a few months, not changing a thing, and now, it doesn't work. My PHP has been upgraded to level 2. This is the code for the PHP:

<html>
<head>
<title>Sending Email...</title>
<meta http-equiv="Refresh"content="3;url=http://deathpie.pcriot.com/Email Sent.html">

</head>
<h2>Sending Request...</h1>
<body>
<?php

$name=$_POST["NameTxt"];
$email=$_POST["Emailtxt"];
$hphone=$_POST["HousePhonetxt"];
$cphone=$_POST["CellPhonetxt"];
$service=$_POST["Requestedservicestxt"];
$to="bion3d@aol.com";
$subject="PPL Form";
$from=$email;
$header="From: $from";
$message=" The PrePaid Legal Applicant is Requesting Approval" . "\n" .
"Name: " . $name . "\n" . "Email: " . $email . "\n" . "Home Phone: " . $hphone .
"\n" . "Cell Phone: " . $cphone . "\n" . "Service: " . $service;
mail("$to", "$subject", "$message", "$header");
echo "Mail Sent";
?>
</body>
</html>

If someone who knows could please read over that and tell me what is going wrong, I would be very appreciative and probably donate points if you ask for it (if the help works >.>).

Symptoms: The pages flow smoothly without PHP error messages. Straight from the form submit button to "mail sending" to "mail sent" to the index page. But I check my mail and the mail never comes.

Thanks alot! =D

~~Ben
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Look up the mail function on http://www.php.net and try the simple example given there to see if it works. That should help you debug yours.

-Corey
 

Swiblet

New Member
Messages
1,114
Reaction score
0
Points
0
Mmmm. Yeah, I copied that and tested the exact php.net mail function example and it still didn't get through to my email. My email is AOL, would that cause a problem? Either it's a problem with my server or my email account, as far as I can see now.

~~Ben

EDITBOING: Never mind o_O I did it and it worked perfectly on a yahoo account. Apparently AOL is stupid. Thanks for trying to help anyway xD

~~Ben
 
Last edited:
Status
Not open for further replies.
Top