Jump to content

Problems setting up the post function


Guest dave@ukdic

Recommended Posts

Guest dave@ukdic

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 by dave@ukdic
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...