• Resolved apere125

    (@apere125)


    Configured WP Mail SMTP plugin to connect via Gmail API as described in these instructions.

    Authenticated the App OK but receive the below error message when configuration is saved. Unable to send test email, button is grayed out.
    Cannot find any posts with similar issues. Has anyone seen this before?

    Notes:
    *Google Gmail account has 2FA disabled and Less Secure Apps enabled.
    *No other SMTP configurations work to 3 other email providers…. Have been fighting this module for over 12 hours now…..

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v1.8.0 logged this error during the last time it tried to send an email:

    Mailer: Gmail
    Host must be a string

    Consider running an email test after fixing it.

    • This topic was modified 4 years, 11 months ago by apere125.
    • This topic was modified 4 years, 11 months ago by apere125.
Viewing 15 replies - 16 through 30 (of 45 total)
  • Same here.
    Rolled back to v1.71 and same error persists.
    Please fix us.

    Same issue here too. Mine came up before I installed the update. Installed update thinking that it would fix the issue but nada. Still getting the same error message.

    [
    Mailer: Gmail
    Host must be a string

    ]

    @lonnie1972
    Good to know, that would suggest its a plugin issue and not gmail….

    @kmanrite Apparently it may not be the update from what others are saying. Just glad its not on my end, otherwise I’d be staying up to fix it. No emails going out to clients sucks though…

    Just curious did anyone have any OTHER issues before the email thing started happening. I had a cURL Error 6 throw some Internal Server Error 500 before THIS started happening. Just wondering if it may be related…

    I just logged into my dashboard and saw the same error everyone is getting.

    Mailer: Gmail
    Host must be a string

    I already checked my Client ID and Client secret, they are fine.

    I’m using:
    – G Suite
    – WordPress 5.3
    – WP Mail SMTP 1.8.0

    @lonnie1972
    Ya I hear you! Glad it’s nit on my end as well…. had to manually send a bunch of emails…. hope it’s fixed soon… otherwise I’ll be spending the entire day tomorrow emailing…. ??

    Ok. I may have a temporary solution….do at your own risk, but I got email to send. thanks to @cmtcav for his warning message I was able to remove source of error. MAKE A COPY OF THE WHOLE PHP FILE BEFORE ATTEMPTING! I am using SendinBlue for email, but may work for others. I am using the FREE version of WP-SMPT also…it may change the code that I removed which I listed below.

    Go to your directory:

    wp-content / plugins / wp-mail-smtp / vendor / guzzlehttp / guzzle / src / Client.php

    In Client.php remove lines 218-248

    Error resolved…

    HONEST MOMENT: I have no clue what those lines do. Thats why I say do at your own risk. Looks to be some sort of error checker.

    Hope it gets people to sleep earlier tonight. Lol.

    HERES THE CODE I REMOVED IN CASE IT APPEARS DIFFERENTLY ON YOURS:

    if ($uri->getHost() && isset($config[‘idn_conversion’]) && ($config[‘idn_conversion’] !== false)) {
    $idnOptions = ($config[‘idn_conversion’] === true) ? IDNA_DEFAULT : $config[‘idn_conversion’];

    $asciiHost = idn_to_ascii($uri->getHost(), $idnOptions, INTL_IDNA_VARIANT_UTS46, $info);
    if ($asciiHost === false) {
    $errorBitSet = isset($info[‘errors’]) ? $info[‘errors’] : 0;

    $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
    return substr($name, 0, 11) === ‘IDNA_ERROR_’;
    });

    $errors = [];
    foreach ($errorConstants as $errorConstant) {
    if ($errorBitSet & constant($errorConstant)) {
    $errors[] = $errorConstant;
    }
    }

    $errorMessage = ‘IDN conversion failed’;
    if ($errors) {
    $errorMessage .= ‘ (errors: ‘ . implode(‘, ‘, $errors) . ‘)’;
    }

    throw new InvalidArgumentException($errorMessage);
    } else {
    if ($uri->getHost() !== $asciiHost) {
    // Replace URI only if the ASCII version is different
    $uri = $uri->withHost($asciiHost);
    }
    }
    }

    • This reply was modified 4 years, 11 months ago by lonnie1972.
    • This reply was modified 4 years, 11 months ago by lonnie1972.
    • This reply was modified 4 years, 11 months ago by lonnie1972.
    • This reply was modified 4 years, 11 months ago by lonnie1972.

    I reseted my client secret at Google APIs, rolled back to v1.7.1 of the plugin and I got the issue got fixed.

    That’s encouraging! Hope this helps find a fix…. not going to erase the code tonight… if there isn’t a fix by the morning I’ll give it a shot…

    I have the same error. The plugin worked just fine before updating to the latest wordpress today. Tried PHP 7.0, 7.2, 7.3.

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v1.8.0 logged this error during the last time it tried to send an email:

    Mailer: Gmail
    Host must be a string
    Consider running an email test after fixing it.

    And right above the Send email button:

    Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46 – assumed ‘INTL_IDNA_VARIANT_UTS46’ (this will throw an Error in a future version of PHP) in /home3/saxonco1/public_html/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Client.php on line 221

    Warning: idn_to_ascii() expects parameter 3 to be integer, string given in /home3/saxonco1/public_html/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Client.php on line 221
    S

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v1.8.0 logged this error during the last time it tried to send an email:

    Mailer: Gmail
    Host must be a string
    Consider running an email test after fixing it.

    Having same issue, after update my site won’t send daily Mailchimp updates, also I can’t, Authorize gmail and can’t send test email, however gmail and mailchimp itself can send no problems.

    Plugin Author Slava Abakumov

    (@slaffik)

    Can someone with the issue provide me this data:

    
    echo $_SERVER['HTTP_HOST'];
    echo $_SERVER['SERVER_NAME'];
    echo $_SERVER['SERVER_ADDR'];
    

    The issue is in the guzzle library processing the host incorrectly. In the latest version (6.5) they added better IDN support, and it seems it’s broken under certain circumstances which I can’t figure out.
    I can’t replicate the issue on own domain and locally.

    Anyway, the 1.8.1 release will come out today with dependencies downgrade.

    Hi,

    I’m having the same issue. Just set up the WP Mail SMTP plugin, configured it correctly with Gsuite only to get this message:

     EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v1.8.0 logged this error during the last time it tried to send an email:
    
        Mailer: Gmail
        Host must be a string

    Website is https://www.virtuals.co/
    Server IP is 109.234.162.102

    Do you know when this will be fixed?

    Many thanks.

    Plugin Author Slava Abakumov

    (@slaffik)

    The new release will go live in a matter of minutes.

Viewing 15 replies - 16 through 30 (of 45 total)
  • The topic ‘Email Delivery Error: Mailer: Gmail Host must be a string’ is closed to new replies.