Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
912
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2. // Multiple recipients
  3. $to = $_POST['email'];// note the comma
  4.  
  5. // Subject
  6. $subject = 'Birthday Reminders for August';
  7.  
  8. // Message
  9. $message = '
  10. <html>
  11. <head>
  12.  <title>Birthday Reminders for August</title>
  13. </head>
  14. <body>
  15.  sample text
  16. </body>
  17. </html>
  18. ';
  19.  
  20. // To send HTML mail, the Content-type header must be set
  21. $headers[] = 'MIME-Version: 1.0';
  22. $headers[] = 'Content-type: text/html; charset=iso-8859-1';
  23.  
  24. // Additional headers
  25. $headers[] = 'To: Mary <mary@example.com>, Kelly <kelly@example.com>';
  26. $headers[] = 'From: Birthday Reminder <birthday@example.com>';
  27. $headers[] = 'Cc: birthdayarchive@example.com';
  28. $headers[] = 'Bcc: birthdaycheck@example.com';
  29.  
  30. // Mail it
  31.  
  32. if($_POST){
  33.  
  34. mail($to, $subject, $message, implode("\r\n", $headers));
  35. }
  36.  
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement