Advertisement
misirceferov

mail() template

Nov 19th, 2017
843
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. // To send HTML mail, the Content-type header must be set
  2. $headers[] = 'MIME-Version: 1.0';
  3. $headers[] = 'Content-type: text/html; charset=iso-8859-1';
  4.  
  5. // Additional headers
  6. $headers[] = 'To: Misir Jafarov <misir.ceferov@gmail.com>';
  7. $headers[] = 'From: Service <service@domain.com>';
  8.  
  9. return @mail($email, 'Subject', 'HTML mail content', implode("\r\n", $headers), '-freturn@domain.com');   // True if successfully
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement