Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. /**
  3. * This function will connect wp_mail to your authenticated
  4. * SMTP server. This improves reliability of wp_mail, and
  5. * avoids many potential problems.
  6. */
  7. function send_smtp_email($phpmailer) {
  8. $phpmailer->isSMTP();
  9. $phpmailer->isHTML(true);
  10. $phpmailer->Host = "smtp.gmail.com";
  11. $phpmailer->SMTPAuth = true; // uncomment for gmail
  12. $phpmailer->Port = 587;
  13. $phpmailer->Username = "";
  14. $phpmailer->Password = "";
  15. $phpmailer->SMTPSecure = "tls"; // uncomment for gmail
  16. //$phpmailer->From = FROM;
  17. //$phpmailer->FromName = FROMNAME;
  18. //$phpmailer->SMTPDebug = 2; // uncomment for full debug
  19. }
  20.  
  21. add_action( 'phpmailer_init', 'send_smtp_email' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement