• Resolved tsmidt

    (@tsmidt)


    Hello,

    I’m unable to send test emails with both Gmail and Sendgrid. Here’s the error log. It recently stopped worked. Thank you.

    Sendgrid error log:
    ——————

    Versions:
    WordPress: 5.8
    WordPress MS: No
    PHP: 7.4.21
    WP Mail SMTP: 3.0.3
    
    Params:
    Mailer: sendgrid
    Constants: No
    Api Key: Yes

    Gmail error log:
    ———————–

    Versions:
    WordPress: 5.8
    WordPress MS: No
    PHP: 7.4.21
    WP Mail SMTP: 3.0.3
    
    Params:
    Mailer: gmail
    Constants: No
    Client ID/Secret: Yes
    Auth Code: Yes
    Access Token: Yes
    
    Server:
    OpenSSL: OpenSSL 1.1.1d  10 Sep 2019
    PHP.allow_url_fopen: Yes
    PHP.stream_socket_client(): Yes
    PHP.fsockopen(): Yes
    PHP.curl_version(): 7.71.0
    Apache.mod_security: No

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tsmidt

    (@tsmidt)

    To me it appears the server is blocking sending because the site had a relay hack in the past few months. So the server shut down and sending operations from the site.

    I came to this conclusion because the company had the emails blocked from the website on their company Microsoft account. In the past I’ve noticed individual email accounts block or mark as spam bad emails where as server/hosting companies take longer to block a server from sending email (mostly because they are shared for smaller web sites).

    We’re changing settings on the server or moving to another hosting platform to fix the issue. If I’m incorrect please feel free to respond.

    Thanks.

    Hi @tsmidt,

    Thanks for reaching out. It looks like there’s an email sending conflict within your site. Maybe you have other similar SMTP plugins configured or you have a custom code snippet in wp-config.php. It does not look specific to your server configuration, you’d probably not need to change your hosting platform for this specific issue.

    Please deactivate all other SMTP plugins (if you have any), check your wp-config.php file, or if you have a must-use plugin with custom code snippet. You might contact your web host support to figure this out.

    I hope this helps!

    Thread Starter tsmidt

    (@tsmidt)

    Hi @sanzeeb3,

    Thanks, I still get an error, but here’s my testing:

    To test the server, I installed a brand new clean WordPress and only the WP Mail SMTP plugin, nothing else. I used the same Gmail app SMTP and it worked. So the server sends emails.

    Then I went back to the problem site and turned off every plugin, deleted all unused themes, removed unused plugins and ONLY kept the WP Mail SMTP plugin active. I retested and it still won’t send.

    I checked the wpconfig file and it is clean, nothing in there. I checked all other customize settings and the PHP files themselves. I also deleted other form plugins that may have had a mailer in them. I removed the API to our email marketing service (Mailchimp).

    Without removing everything from the site and starting over, do you have any suggestions?

    Thanks.

    Hi @tsmidt,

    Thanks for the details! In that case, you might need to contact your web host provider and debug the email sending issue on this specific site. If there’s nothing in wp-config.php, there’s probably on other files. Usually, there could be an empty wp_mail() function causing such an issue.

    Have a good one! 🙂

    Thread Starter tsmidt

    (@tsmidt)

    @sanzeeb3

    I figured it out. I compared the wp-config.php to a new install wp-config.php and there was an extra entry on the last line – Bolded below. I removed this and it worked fine.

    Thanks for your help!

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);
    function wp_mail() {}

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Both Gmail and Sendgrid – There was a problem while sending the test email.’ is closed to new replies.