Can we turn off emails to deleted users and stop contacting our spammers?

Our Discourse is set to approve post count = 1

We use this to protect against spam as the first post from every new user requires moderator approval.

When a spam post is made and caught with this setting, we reject the post and delete the user with a single click:

This works great and protects our community members from ever seeing a single spam post :partying_face:

However, when we ā€œDelete Userā€, Discourse unfortunately then emails that deleted user to tell them they were deleted.

We’d very much like to not be contacting our spammers :pensive_face:

Can we turn this email notification off somehow? :thinking:

1 Like

The issue there being someone on a mission now knows they’ve been deleted so they sign up and try again :facepalm:

Here’s the email the deleted spammer gets sent:

Related: Ruby hash syntax being displayed in emails sent to deleted users

I don’t think the pull request that added the feature included a setting to turn it off.

I currently delete the user from their admin profile page instead of from the review queue. That seems to prevent the email.

1 Like

When you select ā€œDelete and Block Userā€, shouldn’t that disable the email right away?

1 Like

No, it doesn’t. It also emails the user that their account was deleted. There is no difference between deleting with blocking and deleting without blocking.

2 Likes

Interesting workaround, a few extra steps for our moderators though :pensive_face:

I’m also not sure if they have permission to delete a user, I’d need to check that.

That’s disappointing, I really don’t want to be sending emails our spammers :pensive_face:

I click on the avatar in the review queue, click on the name in the user card to open the profile, and use the delete button on the right.
The really annoying part is that you still have to reject the post in the review queue.

1 Like

Thanks for raising this, @Richie.

For some context, we added the feature to email deleted users earlier this year as it is a requirement for compliance with the Digital Services Act where all users need to be notified about changes to their account, including deletion.

To help admins who would rather not have this happen, we’re busy working on a feature that will allow individual email templates to be disabled so they never send to anyone. This will be able to be done per email from the email templates page in the admin.

We’ll circle back to this topic once that feature has been completed and merged.

4 Likes

Does this also apply to the method described above by @Moin ?

I tested this with two tabs open, one with the flagged post in the Review Queue and another with the user profile.

Interestingly, when I clicked Delete on the right side of the profile it also immediately resolved the flag and there was no need to take further action in the Review Queue.

Our Discourse informing persistent trolls and spammers that we’ve just deleted their account simply instructs them to come right back and sign up again :man_facepalming:

The law / act you linked to does not apply to a lot of countries so being able to disable these emails in the future is excellent news, thank you :person_bowing:

3 Likes

Alternatively, what about silencing them? They should have no posts and be (unless you changed the default settings) trust level 0, so their account will cause no harm. They won’t even appear in the user directory and will be purged periodically with the CleanUpInactiveUsers Sidekiq job (default value: 2 years).

Tho I guess that this automatic deletion will also send an email when it occurs then? :thinking:

But I doubt spammers will use the same email address for 2 years…

1 Like

That sends them an email to say they’ve been silenced.

5 Likes