souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

Unable to register, login, or reset my password - Email dispatch failed #71

Closed candideu closed 2 years ago

candideu commented 2 years ago

Hello, thank you for keeping this project going!

I've deployed Commento++ using Heroku. The first time, I didn't add any SMTP settings, and app didn't deploy properly (there was no styling on the home page, and when I clickedd on "Create an account", the page was not found).

I deleted that app and tried again with SMTP credentials from Mailersend: Screenshot_20220214-104939

However, when I created my account, I received the error Email dispatch failed. pleasr contact support to resolve the issue.

When I tried to login, I got this error: Screenshot_20220214-103318

When I tried to create an account with the same credentials, I got this: Screenshot_20220214-103440

When I tried to reset my password, I got this error: Screenshot_20220214-103234

souramoo commented 2 years ago

Thanks for the report! So what is happening here is that the email has been registered on the system but the account is unverified pending email confirmation. However the emails aren't sending so it isn't possible to verify the account! (hence the email is already registered message). The correct way out of this loop is to do a forgot password as you have done once the smtp issue has been fixed.

Do you have any log output please from commento about the email sending and the reason given for it failing? It appears there is some error in connecting to mailersend butwould be helpful to know what it is. Have you tried your mailersend details on any other program e.g. an email client to confirm they work to send emails? You can normally see this on heroku/other service you have deployed to.

candideu commented 2 years ago

I've solved it!

As you mentioned, I tested out my SMTP in a separate application (the newsletter app Listmonk). I checked the logs, and figured out that it was an issue with the COMMENTO_SMTP_FROM_ADDRESS config var.

When I set up Mailersend, I created a subdomain (ms.domain.com), but I set the SMTP from address in Comento++ using my apex domain (email@domain.com). Per Listmonk, Mailersend was flagging it as an unverified domain.

I fixed the config var in Commento++ so that it was email@ms.domain.com, and I was able to reset my password and login.

Thank you so much for your quick reply and help! Can't wait to test this out.

I've been spreading the news about this fork so that it gets more support. This thread might be of interest: https://gitlab.com/commento/commento/-/issues/414#note_842239231