Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $to = "somedude@example.com";
  2. $subject = "Unexpected Error!";
  3. $error_message = "There's been a problem with all the things!\n
  4. Everything is down and people are in danger.\n
  5. Only you can save the world so put down the fritos and dust off your super suit!\n";
  6.  
  7. $headers = array();
  8. $headers[] = "MIME-Version: 1.0";
  9. $headers[] = "Content-type: text/plain; charset=iso-8859-1";
  10. $headers[] = "From: My alter-ego <hero@example.com>";
  11. $headers[] = "Reply-To: myself <hero@example.com>";
  12. $headers[] = "Subject: {$subject}";
  13. $headers[] = "X-Mailer: PHP/".phpversion();
  14.  
  15. mail($to, $subject, $error_message, implode("\r\n", $headers));
  16. echo "email was sent!";
  17. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement