PHP mail function

O

old.SmegHead

Guest
How come the PHP mail command won't always send and email. Its propally formatted and works half the time.

However the script that i've made is supposed to send 2 emails and only seems to work half the time. however when it does work it only sends the email created by the first mail function. I could understand if barrysworld had put a restriction on the number of emails one script can send, but i can't don't understand why it doesn't work.:mad:
 
T

Trebz

Guest
Hmm, never had trouble with the mail function on BarrysWorld myself. Pop on irc #webdev and i'll check the source if you want.
 
O

old.SmegHead

Guest
OK well here's the code, all of it.


<?
if($type=="feedback"){
mail("webmaster@sn-clan.f2s.com",$subject,"Name: $name \n Email: $email \n Comments: \n $comments \n \n *** User Info *** \n IP Address: $REMOTE_ADDR \n Browser Info: $HTTP_USER_AGENT","From:$name <$email>");

mail("$email","Thankyou, your feedback is being processed","Thankyou $name, ($email)\n\nYour feedback has been recieved, thankyou for any suggestions or comments.\nIf you have made a complaint we will take it seriously.\n\nHappy Fragging :)\n\n<a href=\"http://www.sn.barrysworld.net\">S&N Clan</a>\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nMeanwhile why don't you visit our site, where you can use our chat room,\ndownload new maps, scripts and binds. Also you can view various tutorials,\nsuch as making colour sprays, and how to use the console.\n\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=","From:-=[S&N]=- Clan<webmaster@sn-clan.f2s.com>");

} else {
if($type=="join"){
mail("join@sn-clan.f2s.com",$subject,"Name: $name\nAge: $age\nSex: $sex\nEmail: $email\nNet Connection: $connection\nLocation: $location\nServer: $server\nLevel: $level\nClass: $class\nComments:\n$comments","From:$name <$email>");
mail("$email","Your S&N Clan Application Has Been Recieved","Thankyou $name, ($email)\nThe S&N Clan have recieved your application to join, we\nare processing it as we speak. If we are interested we will be\nin touch shortly.\n\nMeanwhile you may visit our site and be able to view various tutorials,\ndownload maps, scripts and binds.\n\n<a href=\"http://www.sn.barrysworld.net\">Click Here to navigate to the S&N Clan Site</a>\n\nHappy Fragging,\n\nS&N Clan :)\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nIf you have any comments or suggestions about the S&N Clan site,\nthen please vistit our site and fill out the feebback form\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=","From:-=[S&N]=- Clan<join@sn-clan.f2s.com>");
} else {
if($type=="member"){
echo("not coded yet");
} else {
if($type=="fight"){
echo("not coded yet");
} else {
echo("not coded yet");
}
}
}
}


echo("<SCRIPT LANGUAGE=\"javascript\">location.href=\"$returnpage\"</SCRIPT>");


?>


Hope this helps you find the problem
 
O

old.SmegHead

Guest
Hmmm.. maybe I should have added the fact that it works perfectly on www.f2s.com's servers, it sends both emails (OK due to the poor nature of F2S's free hosting the emails normally arrive 24hours l8er)
 

Users who are viewing this thread

Top Bottom