• Resolved giannisgx89

    (@giannisgx89)


    Hello,

    I’m reporting a compatibility issue with the SMTP feature in your plugin. It fails to authenticate with my Elastic Email add-on from Cloudways, while other dedicated SMTP plugins work perfectly with the exact same credentials.

    To isolate the problem, I tested my setup with a dedicated SMTP plugin (WP Mail SMTP). When I configure it with my Elastic Email API Key, emails send without any issues. This confirms that my API key, and my domain’s authentication records (SPF/DKIM) are all 100% correct and functional.

    However, when I use the built-in SMTP feature in ASE with the exact same API key, the connection fails with a 535 Authentication failed error. For context, my site is on Cloudways using their Elastic Email add-on, which requires using the API key for both the username and password fields in the SMTP settings.

    Here is the SMTP debug log I managed to get:

    2025-07-10 15:40:40 SERVER -> CLIENT: 220 smtp.elasticemail.com ESMTP
    2025-07-10 15:40:40 SERVER -> CLIENT: 250-smtp.elasticemail.com…250-STARTTLS…250 OK
    2025-07-10 15:40:40 CLIENT -> SERVER: STARTTLS
    2025-07-10 15:40:40 SERVER -> CLIENT: 220 Begin TLS negotiation
    2025-07-10 15:40:40 SERVER -> CLIENT: 250-smtp.elasticemail.com…250 OK
    2025-07-10 15:40:40 CLIENT -> SERVER: AUTH CRAM-MD5
    2025-07-10 15:40:40 SERVER -> CLIENT: 334 PDVhNTNhMjFkLTllZDItNDk0OS1iYWQyLWIwMjBiZWQ5MjgwOD4=
    2025-07-10 15:40:40 CLIENT -> SERVER: [credentials hidden]
    2025-07-10 15:40:42 SERVER -> CLIENT: 535 535 Authentication failed: Access denied.


    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250-smtp.elasticemail.com"
    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250-PIPELINING"
    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250-SIZE 20971520"
    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250-8BITMIME"
    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250-AUTH=PLAIN LOGIN CRAM-MD5"
    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250-AUTH PLAIN LOGIN CRAM-MD5"
    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "250 OK"
    [10-Jul-2025 15:02:44 UTC] SERVER -> CLIENT: 250-smtp.elasticemail.com
    250-PIPELINING
    250-SIZE 20971520
    250-8BITMIME
    250-AUTH=PLAIN LOGIN CRAM-MD5
    250-AUTH PLAIN LOGIN CRAM-MD5
    250 OK

    [10-Jul-2025 15:02:44 UTC] Auth method requested: UNSPECIFIED
    [10-Jul-2025 15:02:44 UTC] Auth methods available on the server: PLAIN,LOGIN,CRAM-MD5
    [10-Jul-2025 15:02:44 UTC] Requested auth method not available:
    [10-Jul-2025 15:02:44 UTC] Auth method selected: CRAM-MD5
    [10-Jul-2025 15:02:44 UTC] CLIENT -> SERVER: AUTH CRAM-MD5

    [10-Jul-2025 15:02:44 UTC] SMTP INBOUND: "334 PGM5NTk3OWQxLTYxNTQtNGRmMS1hMTM2LTYyMmFmM2ZmZTM1MD4="
    [10-Jul-2025 15:02:44 UTC] SERVER -> CLIENT: 334 PGM5NTk3OWQxLTYxNTQtNGRmMS1hMTM2LTYyMmFmM2ZmZTM1MD4=

    [10-Jul-2025 15:02:44 UTC] CLIENT -> SERVER: MzE3QjVCNTZFQTE5NUM2OEEwRDMyNTJBOENERDAzNkUyNjU3MjNDQTlERjAxQjEzMTQxRUE1NUE5QUU0MTJCMjNDN0MyQzk2MUFCMDcyODkzMTYyQkJBNzJENjY3N0M0IGIzNzNmNTkzYjAyN2Y1NjJhNzZjNTBkY2NjNTk2NmZi

    [10-Jul-2025 15:02:46 UTC] SMTP INBOUND: "535 535 Authentication failed: Access denied."
    [10-Jul-2025 15:02:46 UTC] SERVER -> CLIENT: 535 535 Authentication failed: Access denied.

    [10-Jul-2025 15:02:46 UTC] SMTP ERROR: Username command failed: 535 535 Authentication failed: Access denied.

    [10-Jul-2025 15:02:46 UTC] SMTP Error: Could not authenticate.
    [10-Jul-2025 15:02:46 UTC] CLIENT -> SERVER: QUIT

    [10-Jul-2025 15:02:46 UTC] SMTP INBOUND: "221 Good bye"
    [10-Jul-2025 15:02:46 UTC] SERVER -> CLIENT: 221 Good bye

    [10-Jul-2025 15:02:46 UTC] Connection: closed
    [10-Jul-2025 15:02:46 UTC] SMTP Error: Could not authenticate.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Bowo

    (@qriouslad)

    @giannisgx89 thank you for reporting this. I just read the documentaiton at https://help.elasticemail.com/en/articles/4803409-smtp-settings and it appears that you actually need to use an email address for the username. Please try referring to it and setup the SMTP connection again in ASE, and make sure you’re using a port number that is not blocked by your hosting provider, e.g. port 25 is usually blocked.

    Plugin Author Bowo

    (@qriouslad)

    @giannisgx89 however, I do see this documentation at Cloudways https://support.cloudways.com/en/articles/8966003-how-to-integrate-elastic-email-with-your-wordpress-application which indeed state the use of the API key for both the username and password. Do you mind sending a screenshot of your Email Delivery settings? You should of course blur the API key.

    Plugin Author Bowo

    (@qriouslad)

    @giannisgx89 upon looking at your debug log entries and searching for additional information, the error seems to be related to the authentication method your server is choosing, CRAM-MD5. There was a WP Mail SMTP user reporting a similar issue 4 months ago: https://wordpress.org/support/topic/cram-md5-authentication-failing/

    Another case where authentication is using PLAIN or LOGIN works while CRAM-MD5 fails: https://github.com/PHPMailer/PHPMailer/issues/1224 (this is working with PHPMailer library directly).

    Please try and consult with Cloudways and see if it’s possible for them to configure your server to use PLAIN or LOGIN method. Please also send them the URL to this support thread for reference.

    Thread Starter giannisgx89

    (@giannisgx89)

    Hello thank you very much for the quick response!

    Yes they indeed wrote that i need to use the same api key for both username and password.

    I will refer this link to the ticket i have opened on Cloudways.

    https://i.postimg.cc/4dv9Lv80/ase.png
    https://i.postimg.cc/sxVZtBqg/elastic.png

    Best regards,
    Ioannis Chionidis

    Plugin Author Bowo

    (@qriouslad)

    @giannisgx89 you’re welcome and thank you for opening a ticket at Cloudways.

    ASE’s Email Delivery module has not been built to work with authentication via API keys yet, which may explain why you’re seeing the error. I suspect, if you have an account with Elastic Email, following their documentation on delivery via SMTP may work OK. I understand that via Cloudways, the mechanism is replaced with a hybrid between authentication via username/password combined with API key, which is not a scenario ASE has anticipated at this point.

    Let’s hope Cloudways support has some good news. Othrewise, you may need to use WP Mail SMTP for the time being.

    Thread Starter giannisgx89

    (@giannisgx89)

    Thank you very much for your detailed explaination.

    The weird thing is that ASE used to work perfectly fine just before I asked a Cloudways team member to generate a new elastic API key. After that none of my applications work (WordPress and Three.js).

    Yes i use Cloudways elastic addon and I dont have an account on elastic website or anytihng from there.

    I already shared with them this conversation and they are checking it out.

    Thank you again for your time and help.

    Plugin Author Bowo

    (@qriouslad)

    @giannisgx89 good to know that. I hope Cloudways can figure it out if there’s something wrong on their end.

    Thread Starter giannisgx89

    (@giannisgx89)

    Hello,

    I just wanted to report that on my threejs project i changed the email sending method from phpmailer to direct http api and cloudways api key worked then.

    For my wordpress applications i use fluentsmtp for now and i hope you can add support for api keys as well in the future so i can have one less plugin installed.

    Thank you very much for this amazing plugin and all the work you do

    Best regards
    Ioannis Chionidis

    Plugin Author Bowo

    (@qriouslad)

    @giannisgx89 glad to hear you’re able to find workarounds for now. API key support as a feature request has been well-noted. Thanks again for reporting the issue in detail.

    If you think ASE is amazing, please kindly consider writing a quick review for it at https://wordpress.org/plugins/admin-site-enhancements/#reviews. Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘SMTP Feature Issue: Fails with Elastic Email API Key (Works in Other SMTP Plugin’ is closed to new replies.