Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. add_action( 'phpmailer_init', array( &$this, 'prefix_send_smtp_email' ) , 10 );
  2.  
  3. public function prefix_send_smtp_email( PHPMailer $phpmailer ) {
  4.  
  5. // Define that we are sending with SMTP
  6. $phpmailer->isSMTP();
  7.  
  8. // The hostname of the mail server
  9. $phpmailer->Host = "mail.gandi.net";
  10.  
  11. // Use SMTP authentication (true|false)
  12. $phpmailer->SMTPAuth = true;
  13.  
  14. // SMTP port number - likely to be 25, 465 or 587
  15. $phpmailer->Port = "587";
  16.  
  17. // Username to use for SMTP authentication
  18. $phpmailer->Username = "contact@confdays.com";
  19.  
  20. // Password to use for SMTP authentication
  21. $phpmailer->Password = "xxxxxxxx";
  22.  
  23. // Encryption system to use - ssl or tls
  24. $phpmailer->SMTPSecure = "tls";
  25.  
  26. $phpmailer->From = "contact@xxx.com";
  27. $phpmailer->FromName = "Jhon Do";
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement