Kieran_Smith Posted June 26, 2013 Share Posted June 26, 2013 Hi I followed a tutorial on YouTube and created a php contact form. With the form fully filled in it will redirect to a thank you message but i don't receive the email and i get this message "Warning: 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:\wamp\www\TokyoCorner\HTML\Contact_Us.php on line 51" A solution or any ideas would be most helpful Thank you Quote Link to comment https://forums.phpfreaks.com/topic/279611-contact-form/ Share on other sites More sharing options...
darkfreaks Posted June 26, 2013 Share Posted June 26, 2013 (edited) Hi I followed a tutorial on YouTube and created a php contact form. With the form fully filled in it will redirect to a thank you message but i don't receive the email and i get this message "Warning: 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:\wamp\www\TokyoCorner\HTML\Contact_Us.php on line 51" A solution or any ideas would be most helpful Thank you are you running this on a live or test server? if it is running on a test server that is not live chances are you don't have SMTP set up. looks like you arw running WAMP server locally here is a tool you can download that will act as a server to test locally. http://www.toolheap.com/test-mail-server-tool/ Edited June 26, 2013 by darkfreaks Quote Link to comment https://forums.phpfreaks.com/topic/279611-contact-form/#findComment-1438115 Share on other sites More sharing options...
Kieran_Smith Posted June 27, 2013 Author Share Posted June 27, 2013 are you running this on a live or test server? if it is running on a test server that is not live chances are you don't have SMTP set up. looks like you arw running WAMP server locally here is a tool you can download that will act as a server to test locally. http://www.toolheap.com/test-mail-server-tool/ This is great buddy thank you very much ill give it a shot. May have a few questions for you soon tho lol Quote Link to comment https://forums.phpfreaks.com/topic/279611-contact-form/#findComment-1438164 Share on other sites More sharing options...
boompa Posted June 27, 2013 Share Posted June 27, 2013 When you send mail...you must have a mail server (SMTP) to send the mail to. That mail server then sends the mail to its intended recipient at another server. Standard Windows installations do not have a built-in mail server like Linux/UNIX, so you must tell PHP to what server you are going to send mail for transmission. You can read all about it in the mail() runtime configuration documentation. Quote Link to comment https://forums.phpfreaks.com/topic/279611-contact-form/#findComment-1438176 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.