Advertisement
Guest User

Untitled

a guest
Mar 8th, 2016
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <?php
  2. $sendTo = "receipient@mail.com";
  3.  
  4. $headers = 'To: Kristian Acel Gene A. Cua <kristian.cua@gmail.com>' . "rn";
  5. $headers .= 'Bcc: Secret Mail Copy <copy@mail.com>' . "rn";
  6. $headers .= 'From: Sender Mail <no-reply@mail.com>' . "rn";
  7. $headers .= 'X-Mailer: PHP/' . phpversion();
  8.  
  9.  
  10. $mail = mail($sendTo, "Sample Mail [TEST]", "Lorem Ipsum Dolor Sit Amet", $headers, "-fmail@mail.com");
  11.  
  12. if($mail) {
  13. echo "<pre>Message Sent !.</pre>";
  14. } else {
  15. echo "<pre>Message Sending Failed !.</pre>";
  16. }
  17. ?>
  18.  
  19. <?php
  20. $sendTo = "receipient@mail.com";
  21.  
  22. $headers = 'To: Kristian Acel Gene A. Cua <kristian.cua@gmail.com>' . "rn";
  23. $headers .= 'Bcc: Secret Mail Copy <copy@mail.com>' . "rn";
  24. $headers .= 'From: Sender Mail <no-reply@mail.com>' . "rn";
  25. $headers .= 'Reply-To: Reply Mail <reply@mail.com>' ."rn";
  26. $headers .= 'X-Mailer: PHP/' . phpversion();
  27.  
  28.  
  29. $mail = mail($sendTo, "Sample Mail [TEST]", "Lorem Ipsum Dolor Sit Amet", $headers, "-fmail@mail.com");
  30.  
  31. if($mail) {
  32. echo "<pre>Message Sent !.</pre>";
  33. } else {
  34. echo "<pre>Message Sending Failed !.</pre>";
  35. }
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement