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: [email protected]";$Send_Mail = mail($to, $subject, $Message, $header);[/code]i googled it, but i got really confused..... can anyone PLEASE help me Link to comment https://forums.phpfreaks.com/topic/33193-smtp-mail-error-help/ 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? Link to comment https://forums.phpfreaks.com/topic/33193-smtp-mail-error-help/#findComment-154967 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. Link to comment https://forums.phpfreaks.com/topic/33193-smtp-mail-error-help/#findComment-155025 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 protected]") or b) come from my email from the isp ( ie [email protected] or something)???thanks for all your help Link to comment https://forums.phpfreaks.com/topic/33193-smtp-mail-error-help/#findComment-155272 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 Link to comment https://forums.phpfreaks.com/topic/33193-smtp-mail-error-help/#findComment-155410 Share on other sites More sharing options...
PC Nerd Posted January 8, 2007 Author Share Posted January 8, 2007 *BUMP* Link to comment https://forums.phpfreaks.com/topic/33193-smtp-mail-error-help/#findComment-155617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.