Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * This function will connect wp_mail to your authenticated
- * SMTP server. This improves reliability of wp_mail, and
- * avoids many potential problems.
- */
- function send_smtp_email($phpmailer) {
- $phpmailer->isSMTP();
- $phpmailer->isHTML(true);
- $phpmailer->Host = "smtp.gmail.com";
- $phpmailer->SMTPAuth = true; // uncomment for gmail
- $phpmailer->Port = 587;
- $phpmailer->Username = "<USERNAME>";
- $phpmailer->Password = "<PASSWORD>";
- $phpmailer->SMTPSecure = "tls"; // uncomment for gmail
- //$phpmailer->From = FROM;
- //$phpmailer->FromName = FROMNAME;
- //$phpmailer->SMTPDebug = 2; // uncomment for full debug
- }
- add_action( 'phpmailer_init', 'send_smtp_email' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement