Advertisement
Guest User

Untitled

a guest
Mar 31st, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. it echos "sent" but i dont get the email nor in the spam folder of my email
  2.  
  3. <?php
  4.  
  5.  
  6. // Windows may not handle this format well
  7. // $to = "Recipient Name <[email protected]>";
  8.  
  9. // multiple recipients
  10. // $to = "Recipient Name <[email protected]>, [email protected]";
  11.  
  12. $subject = "Mail Test at ".strftime("%T", time());
  13.  
  14. $message = "This is a test.";
  15. // Optional: Wrap lines for old email programs
  16. // wrap at 70/72/75/78
  17. $message = wordwrap($message,70);
  18.  
  19. $from = "Sender Name <[email protected]>";
  20. $headers = "From: {$from}\n";
  21. $headers .= "Reply-To: {$from}\n";
  22. // $headers .= "Cc: {$to}\n";
  23. // $headers .= "Bcc: {$to}\n";
  24. $headers .= "X-Mailer: PHP/".phpversion()."\n";
  25. $headers .= "MIME-Version: 1.0\n";
  26. $headers .= "Content-Type: text/plain; charset=iso-8859-1";
  27.  
  28. $result = mail($to, $subject, $message, $headers);
  29. echo $result ? 'Sent' : 'Error';
  30.  
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement