From Sagar Gulati, 6 Years ago, written in PHP.
Embed
  1. <?php          
  2.         function DoMail($email, $subject, $content)
  3.                 {
  4.                 $from = "noreply@tbc.me";
  5.                 $headers  = 'MIME-Version: 1.0' . "\r\n";
  6.                 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  7.                 $headers .= 'From: ' . $from . "\r\n";
  8.                 $headers .= 'Reply-To: ' . $from . "\r\n";
  9.                 $headers .= 'Return-Path: ' . $from . "\r\n";
  10.                 $optionalparams = '-r'.$from;
  11.                
  12.                 $msg = $content;
  13.  
  14.                 return mail($email, $subject, $msg, $headers, $optionalparams);
  15.                 }
  16.        
  17.  
  18.         DoMail("example@gmail.com", "This is the subject", "<html><head></head><body><h1>This is the content</h1></body></html>");
  19.  
  20. ?>