Stephen 00 Posted March 29, 2007 Share Posted March 29, 2007 Hi, I am very new to php so please go easy on me . I am working my way through a php book and am trying to send a conf email when a user registers but I am getting this error message when I submit the information Warning: "Failed to connect to mailserver, verify your "SMTP" setting in php.ini in" I have downloaded QK SMTP server and added Stephen 00 as a user. I am using phpdev. My code is // Send email. $body = "Thank you for registering with our site! \n Your User Name is '{$_POST['username']}' and your password is '{$_POST['password1']}'.\n\n Sincerely,\n Us"; mail ($_POST['email'], 'Thank you for registering!', $body, 'From: [email protected]'); echo '<p>You are now registered. An email has been sent to your email address confirming your information.</p>'; } and my php.ini code is [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. sendmail_from = [email protected] Can someone tell me what I am doing wrong or what I need to do to fix it. Thanks! Link to comment https://forums.phpfreaks.com/topic/44773-warning-failed-to-connect-to-mailserver-verify-your-smtp-setting-in-phpini/ Share on other sites More sharing options...
monk.e.boy Posted March 29, 2007 Share Posted March 29, 2007 can you send mail like normal? Have you checked your php.ini file? monk.e.boy Link to comment https://forums.phpfreaks.com/topic/44773-warning-failed-to-connect-to-mailserver-verify-your-smtp-setting-in-phpini/#findComment-217389 Share on other sites More sharing options...
Lytheum Posted March 29, 2007 Share Posted March 29, 2007 Seems like you must have QK SMTP server configured wrong. Link to comment https://forums.phpfreaks.com/topic/44773-warning-failed-to-connect-to-mailserver-verify-your-smtp-setting-in-phpini/#findComment-217396 Share on other sites More sharing options...
Stephen 00 Posted March 29, 2007 Author Share Posted March 29, 2007 Yeah I can send email in other programs. What do I need to check in php.ini?? Link to comment https://forums.phpfreaks.com/topic/44773-warning-failed-to-connect-to-mailserver-verify-your-smtp-setting-in-phpini/#findComment-217397 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.