Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/279611-contact-form/
Share on other sites

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 by darkfreaks
Link to comment
https://forums.phpfreaks.com/topic/279611-contact-form/#findComment-1438115
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/279611-contact-form/#findComment-1438164
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/279611-contact-form/#findComment-1438176
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.