Advertisement
Guest User

Untitled

a guest
Feb 9th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2. add_action( 'phpmailer_init', function( $phpmailer ) {
  3. // Define that we are sending with SMTP
  4. $phpmailer->isSMTP();
  5.  
  6. // The hostname of the mail server
  7. $phpmailer->Host = 'localhost';
  8.  
  9. // Use SMTP authentication (true|false)
  10. $phpmailer->SMTPAuth = false;
  11.  
  12. // SMTP port number
  13. // Mailhog normally run on port 1025
  14. $phpmailer->Port = WP_DEBUG ? '1025' : '25';
  15.  
  16. // Username to use for SMTP authentication
  17. // $phpmailer->Username = 'yourusername';
  18.  
  19. // Password to use for SMTP authentication
  20. // $phpmailer->Password = 'yourpassword';
  21.  
  22. // The encryption system to use - ssl (deprecated) or tls
  23. // $phpmailer->SMTPSecure = 'tls';
  24.  
  25. $phpmailer->From = 'admin@wp.dev';
  26. $phpmailer->FromName = 'WP DEV';
  27. }, 10, 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement