Home / Admin / Adding a Custom Filter when using Other SMTP Setting
Duplicate Snippet

Embed Snippet on Your Site

Adding a Custom Filter when using Other SMTP Setting

This snippet will help in troubleshooting steps from "SMTP Error: Could not authenticate".

Code Preview
php
<?php
/* Adding a Custom Filter when using Other SMTP Setting  
 * 
 * Original doc: https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/
*/
add_filter( 'wp_mail_smtp_custom_options', function( $phpmailer ) {
    $phpmailer->AuthType = 'LOGIN';
    return $phpmailer;
} );

Comments

Add a Comment