Skip to content
Back

Cannot use custom SMTP for messaging (SMTP connect() failed)

  • 0
  • Self Hosted
  • Messaging
Jorge
15 Apr, 2026, 00:54

Hey there!

I'm on Appwrite Self-hosted 1.9.0.

I've never used the messaging feature before, always sent emails through functions or a custom backend, but I've decided to give it a go, since it aligns with the rest of the codebase.

However, when adding a custom SMTP provider in the messaging section and trying to send an email, I always get a failed delivery with the following message:

Failed sending to target xxx@gmail.com with error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

The SMTP configuration is exactly the same as set in .env and in the project settings, I've checked 9 times. When sending password recovery emails or other emails from the Auth section, everything works as intended using that same SMTP provider. I've also tried changing ports (587, 465, 25) with and without TLS/SSL, and enabling and disabling "Auto TLS" in the messaging provider, to no avail.

When looking at the logs at the containers appwrite-worker-messaging and appwrite-worker-mails, nothing shows up, zero logs.

This has been reported before here https://discord.com/channels/564160730845151244/1217058432457113710 But although it was fixed, it doesn't seem to work.

Can I do something else to troubleshoot this? Since there are no logs, I'm not sure where the problem might be.

TL;DR
Issue: Cannot send emails using custom SMTP configuration in Appwrite Self-hosted 1.9.0, receiving SMTP connect() failed error. Solution: Although SMTP configuration is correct, emails are not sending successfully. Tried various ports and settings, but to no avail. No logs in appwrite-worker-messaging and appwrite-worker-mails containers. Previous fix on Discord didn't work. Further troubleshooting needed.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more