debweb84 Posted May 27, 2009 Share Posted May 27, 2009 Hi all, Saw a very similar thread about this a couple days ago but wasn't sure if it was resolved..also had some additional questions of my own.. When I test out my form and click submit in the browser, the information 'echoed' to the user is supposed to be routed to an email to myself, the code for which I created in PHP mail($to, $subject, $msg, 'From:' . $email); However I get this error message: 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 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\aliens\report.php on line 44 On my Windows machine, at my house (this is where I'm doing my site) I have in my php.ini file: [mail function] ; For Win32 only. SMTP = smtp.west.cox.net smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com I don't know if there's a semicolon error in this, or an error in what I set my SMTP as ( Cox is the service provider) or my port? Also, the sendmail_from...not sure what I put in there either.. I'd rather not mess with the scripting ini set stuff yet unless absolutely necessary and all else fails, as I'm still at the beginning of learning this stuff thanks! Quote Link to comment https://forums.phpfreaks.com/topic/159808-mailfunction-error-maybe-has-something-to-do-with-my-service-provider/ Share on other sites More sharing options...
sKunKbad Posted May 27, 2009 Share Posted May 27, 2009 Don't waste your time reinventing the wheel if you don't have to. Go get a script like formmail from tectite.com , which supports SMTP, and has a lot of great features you may like. Quote Link to comment https://forums.phpfreaks.com/topic/159808-mailfunction-error-maybe-has-something-to-do-with-my-service-provider/#findComment-842905 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.