Jump to content

Problems configuring WAMP to send emails...


Recommended Posts

Greetings all,

 

I am using WAMP as the server to run the php scripts on but this does not seem to work when sending emails. I have read various information about it but don't seem to be getting a clear answer. It seems that WAMP does not come with a mail server. I have downloaded something called KERIO Mail server hoping that this would resolve the problem. This is only a 30 day trial which is not very good. I also can't get this configured and am getting the following error.

 

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\CIS School\sendmail.php on line 8

 

Message delivery failed...

 

<?php
        //$to = "[email protected]";
        //$subject = "Hi!";
        //$body = "Hi,\n\nHow are you?";
       
        $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: [email protected]' . "\r\n";
       
        if (mail("[email protected]","test subject","test body",$headers))
        {
                echo("<p>Message successfully sent!</p>");
        }
        else
        {
                echo("<p>Message delivery failed...</p>");
        }
?>

 

Any help will be very much appreciated...

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.