Guest User

Untitled

a guest
Dec 10th, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', TRUE);
  4. $from = "mail@smartmusicbulbfor.me";
  5. $ccs = "sitnic.victor@gmail.com";
  6. $headers = "MIME-Version: 1.0 \r\n";
  7. $headers .= "Content-type: text/html; charset=utf-8 \r\n";
  8. $headers .="From: $from\r\n";
  9. $headers .="Cc: $ccs\r\n";
  10. $headers .="X-Mailer: php";
  11.  
  12.  
  13. //trigger exception in a "try" block
  14. try {
  15. $x = mail("leazysunrise@gmail.com", "subject", "message", $headers);
  16. echo 'If you see this, the mail must be sended';
  17.  
  18. }
  19. //catch exception
  20. catch(Exception $e) {
  21. echo 'Message: ' .$e->getMessage();
  22. }
Add Comment
Please, Sign In to add comment