Guest User

Untitled

a guest
Aug 24th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Sent mail from my site to members appears as spam
  2. $headers = "From: info@mysite.comrn";
  3. $headers .= "Reply-To: info@mysite.comrn";
  4.  
  5. if ( mail("myemail@gmail.com","Test","Hello,world !",$headers) ) {
  6. echo "The email has been sent!";
  7. } else {
  8. echo "The email has failed!";
  9. }
  10.  
  11. $to = "emailaddress@tosendto.com";
  12. $subject = "Put Subject Here";
  13. $message = "Put at least a paragraph of text";
  14. $headers = "MIME-Version: 1.0n";
  15. $headers .= "Content-type: text/htmlrn";
  16. $headers .= "X-Mailer: PHP/" . phpversion() . "rn";
  17. $headers .= "From: info@mysite.comrn";
  18. $headers .= "Reply-To: info@mysite.comrn";
  19.  
  20. if ( mail($to,$subject,$message,$headers) ) {
  21. echo "The email has been sent!";
  22. } else {
  23. echo "The email has failed!";
  24. }
Add Comment
Please, Sign In to add comment