SMTP email does not work even with the right firewall rules

Make the following test.

  1. Disable all of your SMTP plugins.
  2. Temporarily enable WP_DEBUG and WP_DEBUG_LOG in your “wp-config.php” file.
  3. Insert the following code in your theme “functions.php” file:
add_action( 'phpmailer_init', function ( $phpmailer ) {
    $phpmailer->isSMTP();
    $phpmailer->Port       = 587;
    $phpmailer->SMTPAuth   = true;
    $phpmailer->SMTPSecure="tls";
    $phpmailer->FromName   = get_bloginfo( 'name' );

    // Type your SMTP credentials below.
    $phpmailer->From = ''; // This is the email address that will be used as sender.
    $phpmailer->Host="";
    $phpmailer->Username="";
    $phpmailer->Password = '';

    // Temporarily enable while debugging.
    $phpmailer->SMTPDebug = 1;
}, PHP_INT_MAX );
  1. Type your credentials in the snippet above and try to send an email. For example, try to reset your password.
  2. Did the message reach your inbox?
  3. If not, what’s inside the file “debug.log” (“…/wp-content/debug.log”)?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)