Announcement

Collapse
No announcement yet.

How to send Email using PHP script

Collapse

Ads on showthread pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to send Email using PHP script

    WordPress Hosting on SSD Servers
    PHP Script to send an Email:
    One can use the following PHP script for sending an E-mail.


    <?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>");
    }
    ?>
Working...
X
Sign up for a News Letter Click here to sign up