Email Script: PHPMail Function

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Shane
    Senior Member
    • Jun 2006
    • 264

    Email Script: PHPMail Function

    In order to send email via PHP Script from windows server one can use below mentioned script:

    <?php
    $to = 'Recipient Email Address';
    $from = 'Senders email address';
    $subject = 'Subject Line of the Message';

    $headers = 'From: Sender's email address'. "\r\n".
    'Reply-To: Reply to email address'. "\r\n".
    Return-Path: Email return path. "\r\n".
    'X-Mailer: PHP/'. phpversion();
    $message = "Message-Body of the message";

    mail($to, $subject, $message, $headers, "-f $from");
    ?>
    Last edited by admin; 08-21-2015, 05:14 AM.
VPS Hosting
Working...
X