Account Approved emails keep being send over and over


#1

RocketChat version: 0.65.1
Number of instances: 1

I migrated a RocketChat installation to a new server environment but I had to disable my SMTP credentials to prevent an issue I’m currently facing. Somehow RocketChat keeps sending users “Account Approved” emails with the content “Your account was activated.”. Even if I set the email verified to true for an user the email is keep being delivered.

An important note might be that all users are created trough the REST API. Also I’m now running the latest version 0.65.1 which I wasn’t running on the previous server. I’m running a single instance of Rocket Chat which I wasn’t on the previous server, there I had 2 instances.

How can I prevent RocketChat sending all those “Account Approved” emails? Is there a queue somewhere in MongoDB I can clear, anything else I can try?


#2

Is it sending the email repeatedly to the same set of people over and over? Or is it just sending the message out repeatedly and going out to different people?

The title suggests the former… The body suggests the latter.


#3

At least one user has received over a hundred of the same approval messages. So messages are being send at least multiple times to the same user. And he isnt the only user receiving that email multiple times. So many users keep receiving the same email. I’m sorry for the unclearity there.


#4

Once you mark as approved are these still going out? I haven’t seen any cases of this being reported.

Can you describe your set up a bit more? Are users required to be manually approved?

What rest api endpoint are you using? Does samething happen when creating through UI also?


#5

Yes, if I mark them manually as approved the emails are still going out. That is the main reason I was wondering if there might be an email queue somewhere maybe.

I’m using the users.create API endpoint with the fields: email, name, password, username, sendWelcomeEmail (value: false).

The option “Manually Approve New Users” is set to false, the same goes for “Email Verification”.

In my logs I still a lot of tries to send out emails (the SMTP settings are still set to an invalid value at the moment).

e[34mI20180611-09:24:11.621(0) Exception in defer callback: Error: getaddrinfo ENOTFOUND smtp.mailgun.com_disabled smtp.mailgun.com_disabled:587     at errnoException (dns.js:50:10)     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)  
e[34mI20180611-09:25:15.170(0) Exception in defer callback: Error: getaddrinfo ENOTFOUND smtp.mailgun.com_disabled smtp.mailgun.com_disabled:587     at errnoException (dns.js:50:10)     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)  
e[34mI20180611-09:26:17.680(0) Exception in defer callback: Error: getaddrinfo ENOTFOUND smtp.mailgun.com_disabled smtp.mailgun.com_disabled:587     at errnoException (dns.js:50:10)     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)  
e[34mI20180611-09:28:30.710(0) Exception in defer callback: Error: getaddrinfo ENOTFOUND smtp.mailgun.com_disabled smtp.mailgun.com_disabled:587     at errnoException (dns.js:50:10)     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)

#6

I assume you’ve tried restarts?

@marcos.defendi any reason you can see for creating via the API to cause this?


#7

@aaron.ogle I don’t know, but I can check. :slightly_smiling_face: