Resend activation emails command?

Hi all
Had some trouble with our instance.

We did not expect so many people to sign up within the first few days so we instantly went over our email quota.
Is there a command we can use to resend all confirmation emails that are yet to be confirmed?

Thanks

I think from the administration panel you can resend them manually, if I’m not wrong

One at a time. 6000 users. :confused:

1 Like

What if the user just reask for the email?

Would rather be proactive about it and send it to them.

1 Like

Do you have any solution to this problem?
Dev are active in moderation but not in helping

I wrote a custom script to do it.
It is pretty easy.

Query the database for emails with accounts with “NULL” activation.
Download that data into a text file and then feed each email into the Resend Confirmation Email page.

Can do 1 email per 2 seconds before it throttles you.

How to do this?

How to feed each email into resend confirmation email Page.

I dont have 10k + User so i think i can do more

You are going to have to Google how to run SQL queries. It is not hard and is worth learning.

It is not about how many users you have but how many requests you can make before the web server throttles you. Looks like there is some built-in limits with Mastodon to prevent bots and spam hitting the instances hard.

1 Like

ok At least tell me how to feed each email into confirmation page

Python script.
I don’t have it anymore and I am not great at python so can’t help you with it

You can run User.where(confirmed_at: nil).find_in_batches(&:resend_confirmation_instructions) in the rails console to resend confirmation instructions to all unconfirmed users.

1 Like

Note that mastodon deletes unconfirmed users after a couple days to prevent spammers from hoarding usernames.

1 Like

Thank You for replying super fast