locked
PHP send mail RRS feed

  • Question

  • User-1941408604 posted

    I installed PHP 5.2.12 for IIS 7 with the Microsoft Web Platform Installer. The PHP test show the installation OK. When I test sending mail with PHP no mail is sent. Should mail be configured specifically for this functionality to be available. 

    This is the send_mail.php PHP script.

     <?php

    $to = "mmowebin@gmail.com";
    $subject = "IIS sent mail";
    $message = "Sending mail through IIS server with PHP.";
    $from = "webinq1@gmail.com";
    $headers = "From: $from";
    //$sentmail_ret = @mail($to, $subject, $message, $headers);
    mail($to, $subject, $message, $headers);

    //echo $sentmail_ret . ": " . "Mail Sent.";
    echo "Mail Sent.";

    ?>

     Thanks.

    Friday, February 19, 2010 8:35 PM

Answers

All replies