Created
February 4, 2016 13:56
-
-
Save ar7n/8167235534b39e6106ff to your computer and use it in GitHub Desktop.
Send email by php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$headers = array(); | |
$headers[] = "MIME-Version: 1.0"; | |
$headers[] = "Content-type: text/html; charset=utf-8"; | |
$headers[] = "From: Sender Name <sender@domain.com>"; | |
$headers[] = "Bcc: JJ Chong <bcc@domain2.com>"; | |
$headers[] = "Reply-To: Recipient Name <receiver@domain3.com>"; | |
$headers[] = "Subject: {$subject}"; | |
$headers[] = "X-Mailer: PHP/".phpversion(); | |
mail($to, $subject, $email, implode("\r\n", $headers)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment