Skip to content

Instantly share code, notes, and snippets.

@ibrahimlawal
Created May 25, 2016 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibrahimlawal/360cc5d19246c9eb9d0eb94f57c996de to your computer and use it in GitHub Desktop.
Save ibrahimlawal/360cc5d19246c9eb9d0eb94f57c996de to your computer and use it in GitHub Desktop.
Sample lines for creating mail headers PHP
<?php
// plain text
$headers = "MIME-Version: 1.0\r\n";
$headers.= "From: =?utf-8?Q?" . quoted_printable_encode("Remaayo Int'l Guest House Limited") . "?= <info@remintguesthouseltd.com.ng>\r\n";
$headers.= "Content-Type: text/plain;charset=utf-8\r\n";
$headers.= "X-Mailer: PHP/" . phpversion();
// html
$headers = "MIME-Version: 1.0\r\n";
$headers.= "From: =?utf-8?Q?" . quoted_printable_encode("Zest") . "?= <info@remintguesthouseltd.com.ng>\r\n";
$headers.= "Content-Type: text/html;charset=utf-8\r\n";
$headers.= "X-Mailer: PHP/" . phpversion();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment