Skip to content

Instantly share code, notes, and snippets.

@ibrahimlawal
Created May 25, 2016 10:28
Show Gist options
  • Select an option

  • Save ibrahimlawal/360cc5d19246c9eb9d0eb94f57c996de to your computer and use it in GitHub Desktop.

Select an option

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") . "?= <[email protected]>\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") . "?= <[email protected]>\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