jwk811 Posted June 7, 2010 Share Posted June 7, 2010 this code works on one site with php4 $subject = "Welcome to SportQuadChat"; $message = "Click this link or copy and paste the url into your address bar to activate your account: http://www.sportquadchat.com/members/process.php?action=activate&code=" . $code; $from = "support@sportquadchat.com"; $headers = "From: $from"; mail($email,$subject,$message,$headers); i used the same script on a different website with php5 and it no longer works.. i wont recieve an email pleas help Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/ Share on other sites More sharing options...
Muffins Posted June 7, 2010 Share Posted June 7, 2010 If it's on a different server, PHP5 is backwards compatible with PHP4 so the server your script is currently on might simply have the mail function disabled. I would check with your host. Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068856 Share on other sites More sharing options...
trq Posted June 7, 2010 Share Posted June 7, 2010 Where is $email defined? Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068865 Share on other sites More sharing options...
jwk811 Posted June 7, 2010 Author Share Posted June 7, 2010 its godaddy for both, i never had to change anything Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068973 Share on other sites More sharing options...
jwk811 Posted June 7, 2010 Author Share Posted June 7, 2010 nevermind it worked when i just did the mail function alone. dunno why its not working with the added variables and stuff. ill figure it out Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068978 Share on other sites More sharing options...
Muffins Posted June 7, 2010 Share Posted June 7, 2010 As Thorpe said, is $email defined? Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068980 Share on other sites More sharing options...
TOA Posted June 7, 2010 Share Posted June 7, 2010 nevermind it worked when i just did the mail function alone. dunno why its not working with the added variables and stuff. ill figure it out Could be as simple as an undefined variable or an incorrect call to the function. And to add to Thorpe's question, where is $code being defined? Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068983 Share on other sites More sharing options...
jwk811 Posted June 7, 2010 Author Share Posted June 7, 2010 TODAY ITS WORKING! thats weird the emails just came hours late. but today they are coming instantly. uh i guess its ok now, thanks anyway guys =] Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1068995 Share on other sites More sharing options...
FeralReason Posted June 7, 2010 Share Posted June 7, 2010 Ah.. the last time this happened to me was because the new site's DNS settings were pointing to the hosting service's default IP instead of my IP address. Could be you reset the DNS to point to your IP address and it just took a few hours for that to be updated by the hosting service. Quote Link to comment https://forums.phpfreaks.com/topic/204070-mail-function-with-php5/#findComment-1069010 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.