Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

a8ball


send html email


 / Published in: PHP
 

  1. include($path."emails/ezine/templates/newsite/index.html");
  2. $message = ob_get_contents();
  3.  
  4.  
  5. $to = $_POST['email'];
  6.  
  7. $subject = 'Breo Newsletter';
  8.  
  9. $headers = "From: [email protected]
  10. ";
  11. //$headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "
  12. ";
  13. //$headers .= "CC: susan@example.com
  14. ";
  15. $headers .= "MIME-Version: 1.0
  16. ";
  17. $headers .= "Content-Type: text/html; charset=ISO-8859-1
  18. ";
  19.  
  20. $sent = mail($to,$subject,$message,$headers);
  21.  
  22. if($sent){
  23. $display_form = false;
  24. }
  25. else {
  26. $error[] = "Mail has not been sent.";
  27. }

Report this snippet  

You need to login to post a comment.