# Mail DSN don't let me connect to my email server

**URL:** https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209
**Category:** Mautic 5 Install/Upgrade Support
**Created:** [March 10, 2024, 2:33am UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209 "2024-03-10T02:33:48Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [March 10, 2024, 2:33am UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/1 "2024-03-10T02:33:48Z")

</div>

**Your software**  
My Mautic version is: 5.0.3  
My PHP version is: 8.0  
My Database type and version is: MySQL 8

**Your problem**  
My problem is: Can’t make email dsn work. I was working perfectly with Mautic 4 but now in Mautic 5 with the change of mail transport I can’t get authenticated

These errors are showing in the log: (no error there, only in the config screen)  
Using currently saved DSN: `smtp://newsletter%40donitalo.com:SECRET@mail.donitalo.com:587`

Failed to authenticate on SMTP server with username “[newsletter@donitalo.com](mailto:newsletter@donitalo.com)” using the following authenticators: “LOGIN”, “PLAIN”. Authenticator “LOGIN” returned “Expected response code “235” but got code “535”, with message “535 Incorrect authentication data”.”. Authenticator “PLAIN” returned “Expected response code “235” but got code “535”, with message “535 Incorrect authentication data”.”.

Steps I have tried to fix the problem:  
I am using the same credentials than in mautic 4, but as I see I need maybe synfony mail transport.  
Since I installed Mautic 5 via Softaculous and not manually probably that is not installed.

What I need to know if I need to install something else in the server or in mautic directory or if the error is some kind of bug or if I am configuring this wrong.

Regards,

Renato

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [March 10, 2024, 4:36pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/2 "2024-03-10T16:36:20Z")

</div>

Update

In the config file it appers like this:

‘mailer\_dsn’ =\> ‘smtp://newsletter%%[40donitalo.com](http://40donitalo.com):%%F0%%9F%%94%%92crOg09UAvBC5@mail.donitalo.com:587’,

It creates double “%” and it shouldn’t but if I remove the double % then it just won’t recognize the server or the user email account.

What I found is that the “lock” icon is there and in this part: %%F0%%9F%%94%%92  
This means: 🔒

Yes, that icon.  
I am not sure that is an expected behaviour and it seems that this is breaking the password recognizing.  
So… I tried to remove that “lock” and it just now won’t recognize the server or with another tweaking, the account.

This is probably a bug. Should I report it as that?

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [March 10, 2024, 5:43pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/3 "2024-03-10T17:43:09Z")

</div>

Update:  
Updated symphony mailer to 5.4

[donitalo@cat marketautomation]$ composer show | grep symfony/mailer  
symfony/mailer v5.4.36 Helps sending emails  
[donitalo@cat marketautomation]$

But still have the same issue.

So probably is not the mailer but, or I am configuring something wrong or there is an issue in the softaculous installed version or something else I can’t locate.

---

<div class="post-metadata">

### Author: ![genghisprime](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@genghisprime](https://forum.mautic.org/u/genghisprime)
#### Post date: [April 2, 2024, 1:13am UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/4 "2024-04-02T01:13:49Z")

</div>

I’m experiencing the same problem even after attempting to update the SMTP settings. My intention was to switch to a different sender, but now I’m unable to establish a connection between the DSN and any of my SMTP accounts. This includes the original one that was previously functioning properly. Did you ever find the fix?

---

<div class="post-metadata">

### Author: ![mcphil](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mcphil](https://forum.mautic.org/u/mcphil)
#### Post date: [April 11, 2024, 12:51pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/5 "2024-04-11T12:51:12Z")

</div>

I had the same Issue with Mautic 5. Found out that in the password the special char ‘\<’ was not properly saved. I removed it. Then it worked.

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [April 11, 2024, 2:56pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/6 "2024-04-11T14:56:24Z")

</div>

Thanks to answer.  
To understand better, you changed your password removing special characters or changed the way is saved in the config file?

---

<div class="post-metadata">

### Author: ![mcphil](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mcphil](https://forum.mautic.org/u/mcphil)
#### Post date: [April 11, 2024, 3:12pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/7 "2024-04-11T15:12:52Z")

</div>

I just removed the special char.

---

<div class="post-metadata">

### Author: ![mcphil](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mcphil](https://forum.mautic.org/u/mcphil)
#### Post date: [April 11, 2024, 3:24pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/8 "2024-04-11T15:24:25Z")

</div>

Edited answer [was to ambigious]:  
I just removed the special char from the password. I saved the password from the backend, not in the config file.

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [April 11, 2024, 3:26pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/9 "2024-04-11T15:26:48Z")

</div>

Thanks will test it today

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [April 11, 2024, 4:49pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/10 "2024-04-11T16:49:43Z")

</div>

Perfect solution, thanks!

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [April 11, 2024, 4:52pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/11 "2024-04-11T16:52:53Z")

</div>

Well mcphil gave the solution

> [@Mail DSN don't let me connect to my email server](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/5):
>
> I had the same Issue with Mautic 5. Found out that in the password the special char ‘\<’ was not properly saved. I removed it. Then it worked.

Is the next comment to yours.

In summary, there is an issue using some special characters, so tested it with less “strange” characters, in my case tried with “\_” or “-” instead of “^”, “~” or non universally used ones and it works.

Why this happens? Maybe this symphony version is using a different character table? who knows, but the solution works and now I can use Mautic 5.

---

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [April 11, 2024, 5:15pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/12 "2024-04-11T17:15:20Z")

</div>

Another question, I am having problems with the IMAP

Error communicating with the IMAP server: [CLOSED] IMAP connection broken (server response)

Same password. Works great on SMTP but in imap… nope.

You faced the same issue?

---

<div class="post-metadata">

### Author: ![rilver](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rilver](https://forum.mautic.org/u/rilver)
#### Post date: [April 11, 2024, 10:28pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/13 "2024-04-11T22:28:26Z")

</div>

el problemas no es con las contraseñas con caracteres extraños, revisen en el campo donde se coloca la contraseña existe un icono de un candado color amarillo, borren ese icono luego coloquen la contraseña que deseen

---

<div class="post-metadata">

### Author: ![mcphil](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mcphil](https://forum.mautic.org/u/mcphil)
#### Post date: [April 12, 2024, 7:55am UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/15 "2024-04-12T07:55:34Z")

</div>

Haven’t tried yet. Trouble really started with an error 500 after entering the Imap/Bounce-Details. I erased everything related in the conf file, than retried with smtp first (then came the issue with the special char) and then I stopped working on this project for this week. Advice: Check the array in the conf file if there is anything missing for proper imap. Would be happy to know if you could solve this one.

---

<div class="post-metadata">

### Author: ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)
#### Post date: [April 13, 2024, 9:21am UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/16 "2024-04-13T09:21:57Z")

</div>

Are you using Amazon SES?

> <https://github.com/mautic/mautic/issues/13228>
>
> \### Mautic Version
> 
> 5.0.x series
> 
> \### PHP version
> 
> 8.1
> 
> \### What browsers are yo…u seeing the problem on?
> 
> Not relevant
> 
> \### What happened?
> 
> I believe there is a problem in setting up the queue for email using Amazon SQS. If I get a secret\_key that includes any special character i.e. / o + then at the moment the secret is retrieved a % is appended to this character (in the config/local.php), even after parsing it gets the wrong secret to the SQS and obviously it doesnt verify. 
> Workaround: try to get secret\_key without special characters. 
> 
> \### How can we reproduce this issue?
> 
> Configure sqs scheme in the queue, use any special character in the secret
> 
> Scheme: sqs
> Host: default
> Port: empty
> Path: empty
> User: empty
> Password: empty
> Options:
> access\_key: (amazon access key)
> account: (amazon account)
> auto\_setup: false
> queue\_name: (name of the queue)
> secret\_key: (amazon secret key)
> region: us-east-1
> 
> \### Relevant log output
> 
> \_No response\_
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct
> 
> \<br /\>\<hr\>
> Care about this issue? Want to get it resolved sooner? If you are a \<a href='https://www.mautic.org/become-a-member-of-mautic'\>member of Mautic\</a\>, you can add some funds to the \<a href='https://opencollective.com/mautic/projects/bounties'\>Bounties Project\</a\> so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs \<a href='https://contribute.mautic.org/product-team/mautic-bounty-programme'\>here.\</a\>

> <https://github.com/mautic/mautic/issues/12256>
>
> \### Mautic Version
> 
> 4.4.x series
> 
> \### PHP version
> 
> 8.0
> 
> \### What browsers are yo…u seeing the problem on?
> 
> Not relevant
> 
> \### What happened?
> 
> Pretty simple, but hard to find: if Amazon AWS SES defines a secret / password that contains a "/" it will lead to an authorization error with the plattform. The error message:
> 
> \`Error executing "GetAccount" on "https://email.eu-central-1.amazonaws.com/v2/email/account"; AWS HTTP error: Client error: \`GET https://email.eu-central-1.amazonaws.com/v2/email/account\` resulted in a \`403 Forbidden\` response: {"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access (truncated...) InvalidSignatureException (client): The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. - {"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."}\`
> 
> The problem: AWS assigns the password randomly, often it contains a "/". You can only delete the just created key and create a new one - hoping this time its without the "special" character.
> 
> \### How can we reproduce this issue?
> 
> Step 1: Connect with Amazon SES API with a password, that contains a "/"
> Step 2: Save and test the connection - it will throw this error.
> Step 3: Back to AWS and get another key assigned. It it has no "/" it will work.
> 
> \### Relevant log output
> 
> \`\`\`shell
> \`Error executing "GetAccount" on "https://email.eu-central-1.amazonaws.com/v2/email/account"; AWS HTTP error: Client error: \`GET https://email.eu-central-1.amazonaws.com/v2/email/account\` resulted in a \`403 Forbidden\` response: {"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access (truncated...) InvalidSignatureException (client): The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. - {"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."}\`
> \`\`\`
> 
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct
> 
> \<bountysource-plugin\>
> 
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://app.bountysource.com/issues/121828581-connection-with-amazon-ses-api-won-t-work-error403-when-the-defined-password-contains-a?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://app.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

---

<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: [April 14, 2024, 9:22pm UTC](https://forum.mautic.org/t/mail-dsn-dont-let-me-connect-to-my-email-server/31209/17 "2024-04-14T21:22:09Z")

</div>

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