mail function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

mail function

Post by anthony88guy »

Code: Select all

<?

$to = "xxxxxxxxx@optonline.net";
$subject = "KOS Member Application";
$name = $_POST&#1111;'name'];
$age = $_POST&#1111;'age'];
$location = $_POST&#1111;'location'];
$kochistory = $_POST&#1111;'kochistory'];
$uniquelink = $_POST&#1111;'uniquelink'];
$email = $_POST&#1111;'email'];
$requestedemail = $_POST&#1111;'requestedemail'];
$message = "<b>Name:</b> $name<br><b>Age:</b> $age<br><b>Location:</b> $location<br><b>KOC History</b> $kochistory<br><b>Unique Link</b> $uniquelink<br><b>Email:</b> $email<br><b>Requested Email:</b> $requestedemail";
mail($to, $subject , $message);

echo "<strong><font color="#FF0000">Email was Sent</font></strong>";
?>
I am trying to retrieve information from my website and send an email to my self. The website is http://nokidding.websiteallies.com/appl ... lyform.htm

i've searched the code numerous times and cannot find any errors.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

.....and......?
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

The code gets executed because it displays the email has been sent, but when I check my email I find nothing.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

standard mail() debugging: check the return value of mail(). If it returns success, then you may need headers.. if you can check the email account you are sending through, check for bounces.. if you can send "normal" email to the account you are sending to, then try combinations of the headers sent along with it.
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

Is it possible for the hosting company to not allow the mail() function? Because a while back I make a comments page, where it sent me a comments via email, and now that doesnt work either.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

php settings allow the host of it to disable any function they desire.. check the output of phpinfo() to find out.
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

sorry, it looks like the server was having trouble i got the emails, couple hours later
Post Reply