PC Nerd Posted January 7, 2007 Share Posted January 7, 2007 i want to send an email from my localhost server, but i get this error on the page" Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in ***File Name***/B_A-New_Player_Create.php on line 59my code for sending the email is:[code]$to = $Email;$subject = "New Battle Ages Acccount Confirmation";$Message = "To ".$F_Name."<br>";$Message = $Message."User Name :".$User_Name."<br>";$Message = $Message."Password :".$Password."<br>";$Message = $Message."Security Number :".$Security_Number."<br><br>";$Message = $Message."Please type your Security Number into the field below ( with no spaces or dash's), to activate your account";$Message = $Message."Thankyou for signing up to Battle-Ages. Please email us a the above address for help and support.<br><br>Yours, Battle-Ages Administration Team";$header = "From: admin@battle-ages.itsmyland.com";$Send_Mail = mail($to, $subject, $Message, $header);[/code]i googled it, but i got really confused..... can anyone PLEASE help me Quote Link to comment Share on other sites More sharing options...
trq Posted January 7, 2007 Share Posted January 7, 2007 Do you have a mail server set up loaclly? This is not usually the case.What OS are you using? Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted January 7, 2007 Share Posted January 7, 2007 i got round this on my dev box by setting up the "SMTP" setting in php.ini to my SMTP mail account address provided by my service provider. Works fine for me. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 7, 2007 Author Share Posted January 7, 2007 ok. im running on windows, i think i have a mail server locally, its mercury mailserver32 but i have no idea how to run it??? it comes with xampp i think, but i do have the option of reinstalling it seperately........ and if i run the mail through my isp would that mean that the email would be displayed as being a) from the email in the header ie( "From: email@address.com") or b) come from my email from the isp ( ie myemail@isp.net or something)???thanks for all your help Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 8, 2007 Author Share Posted January 8, 2007 ok, im a complete n00bie at this.... all the email and smtp stuff, can someone please explain this to me, becauase i really dont understand???? PLEASE Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 8, 2007 Author Share Posted January 8, 2007 *BUMP* Quote Link to comment 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.