Guest User

Untitled

a guest
Oct 15th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2. $email_to = 'myemail@gmail.com';
  3. $email_subject = "Test mail";
  4. $email_body = "Hello! This is a simple email message.";
  5. $from = "myemail@gmail.com";
  6.  
  7. if(mail($email_to, $email_subject, $email_body)){
  8. echo "The email($email_subject) was successfully sent.";
  9. } else {
  10. echo "The email($email_subject) was NOT sent.";
  11. }
  12. ?>
  13.  
  14. [mail function]
  15. ; For Win32 only.
  16. ; http://php.net/smtp
  17. SMTP = smtp.gmail.com
  18. ; http://php.net/smtp-port
  19. smtp_port = 587
  20.  
  21. ; For Win32 only.
  22. ; http://php.net/sendmail-from
  23. sendmail_from = myemail@gmail.com
  24.  
  25. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  26. ; http://php.net/sendmail-path
  27. sendmail_path = ""
Add Comment
Please, Sign In to add comment