Mail wont send error 535 (Zoho SMTP)

trying to get mail working for subscriptions

this is my docker compose:

    environment:
      database__client: mysql
      database__connection__host: blog-db
      database__connection__user: root
      database__connection__password: example
      database__connection__database: ghost
      url: https://blog.serversatho.me
      TZ: America/New_York
      security__staffDeviceVerification: false
      privacy_useTinfoil: true
      mail__options__auth__pass=: XXXXXX
      mail__options__auth__user: evan@serversatho.me
      mail__options__host: smtp.zoho.com
      mail__options__port: 587
      mail__options__secure: false
      mail__options__service: zoho
      mail__transport: SMTP
      mail__from: evan@serversatho.me

this is the logs error:

[2025-12-02 16:17:19] ERROR Failed to send email. Reason: Invalid login: 535 Authentication Failed.
Failed to send email. Reason: Invalid login: 535 Authentication Failed.
"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
Error ID:
    48f7e2b0-cfc4-11f0-b21c-db5c7e325661
Error Code: 
    EAUTH
----------------------------------------
Error: Invalid login: 535 Authentication Failed
    at createMailError (/var/lib/ghost/versions/5.130.5/core/server/services/mail/GhostMailer.js:81:12)
    at SMTPConnection._formatError (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:809:19)
    at SMTPConnection._actionAUTHComplete (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:1588:34)
    at SMTPConnection.<anonymous> (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:1542:18)
    at SMTPConnection._processResponse (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:993:20)
    at SMTPConnection._onData (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:774:14)
    at SMTPConnection._onSocketData (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
    at TLSSocket.emit (node:events:524:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)
[2025-12-02 16:17:19] ERROR "POST /members/api/send-magic-link/" 500 643ms
Failed to send email. Reason: Invalid login: 535 Authentication Failed.
"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
Error ID:
    48f7e2b0-cfc4-11f0-b21c-db5c7e325661
Error Code: 
    EAUTH
----------------------------------------
Error: Invalid login: 535 Authentication Failed
    at createMailError (/var/lib/ghost/versions/5.130.5/core/server/services/mail/GhostMailer.js:81:12)
    at SMTPConnection._formatError (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:809:19)
    at SMTPConnection._actionAUTHComplete (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:1588:34)
    at SMTPConnection.<anonymous> (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:1542:18)
    at SMTPConnection._processResponse (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:993:20)
    at SMTPConnection._onData (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:774:14)
    at SMTPConnection._onSocketData (/var/lib/ghost/versions/5.130.5/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
    at TLSSocket.emit (node:events:524:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)

based on all other posts this should be working but i get this error no matter what combo i try. was anyone successful in this?

also i had zoho on the phone just to make sure its not something weird on my end. using the tool SMTP Test Tool it worked no problem using same settings:

also on 587:

Why do you have = here?

1 Like

Sharp eyes, @muratcorlu !

1 Like

great catch! copied from somewhere else and didnt even catch that.

now that i corrected that, i get a new error:

ERROR Failed to send email. Reason: Message failed: 553 Sender is not allowed to relay emails.

I think you need to enable something on Zoho to use its SMTP service.

whats weird is when i call them they have me use the smtp test tool (see link + screenshots above) to ensure its working and it does work! so i dont think its smtp or zoho since the tool does indeed send me a test email. their stance is - if smtp test tool works its not an issue on their end otherwise that would be failing. must be ghost.

now im stuck. any advice?

Is your VPS provider blocking outgoing SMTP connections? DigitalOcean started doing that on some ports:

One workaround that works on some mail providers is using port 2525. Not sure if Zoho supports that?

(though to be fair…the error message should be a different one then, I guess…)

not using a VPS - self hosted from my home. do you think my ISP is blocking? (FiOS)

No, I doubt that. That would also mean you couldn’t send emails using an email client :smiley:

So, ignore me in this case…

1 Like

I think this should be true

The blocked port thing is super common, (especially for residential isps) but I don’t think that produces a 535 error - that tends to give timeouts.

Are you using an app password, or your regular password? Are you very sure you have the right smtp server? Looks like Zoho runs different servers for different account locations, and a mismatch (or incorrect credentials) can cause this behavior.

SWAKS may be worth a try here for debugging, since you’d run it on your actual server rather than your phone.

1 Like

when using 587 it does need to be false. when set to true i get errors in the logs indicating its an SSL issue. for some reason 587 needs to be set to false and 465 needs to be set to true.

i have tried both the app password and the regular password. same error both times.

do you know of any other smtp hosts i should be using?

again whats weird is this is working with the test tool so i cant imagine why the docker container is failing here…

what is SWAKS?

This page mentions a separate SMTP server for EU based servers. Can it be the reason?

… we see that the domain is hosted in our EU based server and the host you may need to use is smtp.zoho.eu

https://help.zoho.com/portal/en/community/topic/zoho-nodemailer

oh interesting. Im US based so im not sure….

I see many similar topics on Zoho Community Forum, about 553 errors. Most of them seems related with DNS configuration. I think that forum can help better.

1 Like