don't allow gmail addresses to subscribe

This commit is contained in:
Brian Picciano 2022-08-09 20:56:34 -06:00
parent 7f6d7366e3
commit cd1d97bebf
2 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,10 @@ func (a *api) mailingListSubscribeHandler() http.Handler {
len(email) >= 512 { len(email) >= 512 {
apiutil.BadRequest(rw, r, errors.New("invalid email")) apiutil.BadRequest(rw, r, errors.New("invalid email"))
return return
} else if strings.ToLower(parts[1]) == "gmail.com" {
apiutil.BadRequest(rw, r, errors.New("gmail does not allow its users to receive email from me, sorry"))
return
} }
err := a.params.MailingList.BeginSubscription(email) err := a.params.MailingList.BeginSubscription(email)

View File

@ -42,6 +42,12 @@
complete the process if you don't immediately see anything in your inbox. complete the process if you don't immediately see anything in your inbox.
</p> </p>
<p style="color: red;">
Unfortunately Google considers all emails from my mail server to be spam. I'm
tired of seeing the bounce errors on my side, so I'm disabling the ability to
sign up for the mailing list with a GMail address. Sorry (not sorry).
</p>
<style> <style>
#emailStatus.success { #emailStatus.success {