irishchessunion / icu_www_app

A new website for the Irish Chess Union
0 stars 0 forks source link

Fix missing email address verification emails #1

Open ninkibah opened 2 months ago

ninkibah commented 2 months ago

Ben and I looked at the mailgun logs, and saw about 16% of emails fail to be delivered.

We also looked at the rails code that sends out the emails, and we don't see anything wrong with it. So, we presume the issue is with mailgun not being very stable. We also noticed that most of the emails were failing because Spamhaus was rejecting many of these emails.

We think we need to add a job to take all new unverified Users that are 3-4 days old, and resend the verification email to them.

User.unverified.where("created_at is between ? and ?", 3.days.ago, 2.days.ago).send_verification_email

This should reduce the amount of new users complaining about not being able to login.