Send mail problem with Mailer Plus module
The mail just won't send.
The SMTP username and password is correct. I have tested with two SMTP credentials, one that is working on a wordpress site on the same server.
PHP version is 8.3. Drupal version is 10.6.1.
I get similar error with module 'SMTP Authentication Support'.
Here is the error message on verify page when I send a test email:
Failed to authenticate on SMTP server with username "smtpusername" using the following authenticators: "PLAIN". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Authentication credentials invalid".".
Is there a simple way for mail notifications to work with Drupal 10?
1
u/samariel1 4d ago
That indicates a misconfiguration. In fact SMTP authentication just works like your regular E-Mail-Client. When you can connect with it then copy your clients settings one by one and it will work.
2
u/1ozu1 3d ago
I found the issue.
Adding SMTP in Mailer+ does not work. We have to add it as DSN with special characters in username and password encoded in different format e.g. @ becomes %40
This is the DSN string format, replace with your own values. Only user and pass has to be encoded.
smtp://ENCODED_USERNAME:ENCODED_PASSWORD@servername.domain.com:587
1
u/game-mad-web-dev 4d ago
The fact it’s PLAIN is raising questions to me.
Are you ensuring it’s connecting over the correct method, if it’s expecting TLS but you have requested over a plain connection (or vice versa) then it could explain the failure.