Guest dave@ukdic Posted April 14, 2009 Report Posted April 14, 2009 (edited) Ive installed wamp on my local machine and going through the excellent tutorials. Ive run into a problem with the post function. After copying the function code: <?php $did_send = mail('general@ukdic.co.uk' , 'ukdic test email' , "The body message"); echo " Email sent " . $did_send; ?> I got this error in the browser: [b]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:\wamp\www\php_test_files\Hello-world.php on line 49[/b] Email sent I then changed the smtp setting from 'localhost' to my real smtp mail address (mail.something.co.uk) in my php .ini file as suggested in another post sometime ago. However, even though Ive made the changes, Im still getting the error message. From what I can make out, the mail function was ignored and just went on and echoed the Email sent. I'd appreciate any help to get this problem fixed. As I'm really enjoying the tutorials. Edited April 14, 2009 by dave@ukdic Quote
falkencreative Posted April 15, 2009 Report Posted April 15, 2009 This usually happens when you are trying to use the mail() function on your local machine. I usually encourage people to bypass this for now, and test on a live server, where you shouldn't run into this issue. If I can find the links about setting up your php.ini file correctly to allow you to send email from your local machine, I'll post them. Quote
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.
Note: Your post will require moderator approval before it will be visible.