dark_shadow87 Posted August 29, 2008 Share Posted August 29, 2008 Here my code <?php $to="dave_ren09@yahoo.com"; $sub="PHP Try"; $msg="Helo how are u!"; $from="admin@dave.com"; $header="From: " .$from; mail($to,$sub,$msg,$header); echo "Mail sent"; ?> Now... when i view it... it has the following error: Failed to connect to mailserver at "mail.dave.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in Please help...tnx Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 29, 2008 Share Posted August 29, 2008 is there a server at mail.dave.com? does it accept connections on port 25? Scott. Quote Link to comment Share on other sites More sharing options...
Eggzorcist Posted August 29, 2008 Share Posted August 29, 2008 Read the error carefully. It does not state anything wrong with you're code. You must setup a mail server for you're server. Most hosting have this configured automatically. However if you are using WAMP, LAMP or MAMP you might not have it configured. You should find how to set it up on google fairly easily. Quote Link to comment 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.