How to send email using php script?

I want to send email using php website can anyone tell me How to send email using php script?


Comments

One Response to “How to send email using php script?”

  1. Agueda Jandron on July 31st, 2010 2:34 pm

    You can use mail function to send email using php , hope following code will help you

    <?php
    $to = "recipient@example.com";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";
    if (mail($to, $subject, $body)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed…</p>");
    }
    ?>

Powered by Yahoo! Answers