# Mautic 5 SMTP 535 error

**URL:** https://forum.mautic.org/t/mautic-5-smtp-535-error/32156
**Category:** Product Support
**Created:** [May 24, 2024, 7:44pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156 "2024-05-24T19:44:51Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ruben123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ruben123/32/9240_2.png) [@ruben123](https://forum.mautic.org/u/ruben123)
#### Post date: [May 24, 2024, 7:44pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/1 "2024-05-24T19:44:51Z")

</div>

**Your software**  
My Mautic version is: 5.0.4  
My PHP version is: 8.0.30  
My Database type and version is: Maria DB 10.5.23

**Your problem**  
My problem is:

When testing my SMTP credentials in the config, i get this error:  
Failed to authenticate on SMTP server with username “emailappsmtp.5cff9b4b6xxxxx” using the following authenticators: “LOGIN”, “PLAIN”. Authenticator “LOGIN” returned “Expected response code “235” but got code “535”, with message “535 Authentication Failed”.”. Authenticator “PLAIN” returned “Expected response code “235” but got code “535”, with message “535 Authentication Failed”.”.

When testing on the same server with swaks, everything is working and the email arrives:  
swaks --to test@mydomain.eu --from [hello@test.io](mailto:hello@test.io) --server smtp.zeptomail.eu --port 587 --tls --auth LOGIN --auth-user “emailappsmtp.5cff9b4b6xxxxx” --auth-password "xxxxxx  
"

These errors are showing in the log: None

Steps I have tried to fix the problem: Verified my user and password 10 times…

 ![2024-05-24 21_47_15-Configuration _ Mautic](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/dd761fa7a5d591232438d7cd55a98a85c8fc0efb.png)

---

<div class="post-metadata">

### Author: ![ruben123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ruben123/32/9240_2.png) [@ruben123](https://forum.mautic.org/u/ruben123)
#### Post date: [May 25, 2024, 1:16pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/2 "2024-05-25T13:16:44Z")

</div>

I found out what went wrong, and i think this is a bug…

When i put the dsn in the config file (app/config/config.php) just as i can see it in above screenshot, (with password instead of SECRET) , it works!

So it must be something related to the env() function?

---

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [March 9, 2025, 9:57am UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/3 "2025-03-09T09:57:43Z")

</div>

I can confirm this is still the issue.  
I just burnt three hours trying to configure an SMTP connection using a custom port with TLS and LOGIN, documentation is weak on the mautic end, and when checking Symphony documentation: [Sending Emails with Mailer (Symfony 5.x Docs)](https://symfony.com/doc/5.x/mailer.html), it does say that the new DSN will run through different smtp methods automatically.

Was going a bit mad as when using [SMTPer](https://www.smtper.net/) everything was working. Thanks @ruben123 for your post - saved me here and got things working!

---

<div class="post-metadata">

### Author: ![ripon21](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ripon21/32/14178_2.png) [@ripon21](https://forum.mautic.org/u/ripon21)
#### Post date: [June 19, 2025, 5:47pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/4 "2025-06-19T17:47:54Z")

</div>

I am facing the same issue. Could you please help me fix the problem?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/6df0e2de899836306fa878166529c3f3b5a59ad5.png)

---

<div class="post-metadata">

### Author: ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)
#### Post date: [June 19, 2025, 6:34pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/5 "2025-06-19T18:34:35Z")

</div>

Please make that when entering the password you do NOT leave the “lock” icon in the field - it will be considered part of the password!  
Ugly UI bug but easy to circumvent once you know it 😉

---

<div class="post-metadata">

### Author: ![ripon21](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ripon21/32/14178_2.png) [@ripon21](https://forum.mautic.org/u/ripon21)
#### Post date: [June 19, 2025, 7:01pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/6 "2025-06-19T19:01:03Z")

</div>

I’m truly surprised and amazed! After removing the lock icon, my connection was successful. Thank you so much! But honestly, their UI is quite misleading.

 ![work](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4bbff001989132db1858e87ed53b07f0392954a3.png)

---

<div class="post-metadata">

### Author: ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)
#### Post date: [June 19, 2025, 7:30pm UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/7 "2025-06-19T19:30:34Z")

</div>

Thruth be told, I went crazy figuring that out myself just three days ago! 🙀

BTW feel free to support our Mautic “quality sprint” in Prague next week to get some gremlins like this squashed…

> **[Clean me up, Scotty! Join the Mautic Community Sprint! - Mautic](https://mautic.org/blog/clean-me-up-scotty-join-the-mautic-community-sprint/)**
>
> The Mautic community is gathering in Prague on July 9–10 for a focused Product Quality Sprint! This is your chance to help make Mautic even better.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)
#### Post date: [June 21, 2025, 7:30am UTC](https://forum.mautic.org/t/mautic-5-smtp-535-error/32156/8 "2025-06-21T07:30:57Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
