Last active
February 10, 2019 20:12
-
-
Save bantya/19da1685f105197d09adca2d02bfbba3 to your computer and use it in GitHub Desktop.
PHP: Mail headers
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 = [ | |
'MIME-Version: 1.0', | |
'Content-Type: text/html; charset="UTF-8";', | |
'Content-Transfer-Encoding: 7bit', | |
'Content-Disposition: inline', | |
'Date: ' . date('r', $_SERVER['REQUEST_TIME']), | |
'Message-ID: <' . $_SERVER['REQUEST_TIME'] . md5($_SERVER['REQUEST_TIME']) . '@' . $_SERVER['SERVER_NAME'] . '>', | |
'From: ' . $from, | |
'Reply-To: ' . $from, | |
'Return-Path: ' . $from, | |
'X-Mailer: PHP v' . phpversion(), | |
'X-Originating-IP: ' . $_SERVER['SERVER_ADDR'], | |
'X-Priority: 1 (Higuest)', | |
'X-MSMail-Priority: High', | |
'Importance: High', | |
'Sensitivity: Personal', | |
]; | |
// Sensitivity: Normal, Personal, Private and Company-Confidential | |
// These will be recognised and handled in Outlook, Thunderbird and others. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment