Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'phpmailer_init', function( $phpmailer ) {
- // Define that we are sending with SMTP
- $phpmailer->isSMTP();
- // The hostname of the mail server
- $phpmailer->Host = 'localhost';
- // Use SMTP authentication (true|false)
- $phpmailer->SMTPAuth = false;
- // SMTP port number
- // Mailhog normally run on port 1025
- $phpmailer->Port = WP_DEBUG ? '1025' : '25';
- // Username to use for SMTP authentication
- // $phpmailer->Username = 'yourusername';
- // Password to use for SMTP authentication
- // $phpmailer->Password = 'yourpassword';
- // The encryption system to use - ssl (deprecated) or tls
- // $phpmailer->SMTPSecure = 'tls';
- $phpmailer->From = 'admin@wp.dev';
- $phpmailer->FromName = 'WP DEV';
- }, 10, 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement