Announcement

Collapse
No announcement yet.

How to send email via PHP code on Windows server

Collapse

Ads on showthread pages

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

  • How to send email via PHP code on Windows server

    WordPress Hosting on SSD Servers
    Hello All,

    One can send email via PHP code on windows server. Please refer below mentioned sample script of PHP Mail:

    <?php

    $to = 'To Email account';
    $from = 'From Email account';
    $subject = 'Subject line of the message';

    $headers = 'From: From email account' "\r\n".
    'Reply-To: Reply to email account'. "\r\n".
    'Return-Path: Return path email account.' "\r\n".
    'X-Mailer: PHP/' . phpversion();
    $message = "Message of the email body section";

    mail ($to, $subject, $message, $headers, "-f $from");

    ?>

    Thanks,

    Shane G.
    AccuWebHosting.Com
    Last edited by admin; 08-05-2015, 07:45 AM.
Working...
X
Sign up for a News Letter Click here to sign up