Mailer test address logic broken
This logic in Mailer.scala is broken: -
val isTestAddress =
emailToSend.sentTo.endsWith("example.com") ||
emailToSend.sentTo.endsWith("ex.com") ||
emailToSend.sentTo.endsWith("x.co")`
This will mean emails won't be sent to a ton of domains, e.g. index.com, codex.com, overcomplex.com, reflex.com, etc, etc. Probably needs to be something like: -
val isTestAddress =
emailToSend.sentTo.endsWith("@example.com") ||
emailToSend.sentTo.endsWith("@ex.com") ||
emailToSend.sentTo.endsWith("@x.co")`
- KajMagnus @KajMagnus2020-02-25 13:46:07.372Z
Gah. Fixing now. Thanks
The fix:
val isTestAddress = emailToSend.sentTo.endsWith("@example.com") || emailToSend.sentTo.endsWith(".example.com") || emailToSend.sentTo.endsWith("@ex.com") || emailToSend.sentTo.endsWith("@x.co")
How did you notice this?
(B.t.w. tripple ticks for multi line code :- ) ``` )
- GGraeme Mitchell @GraemeMitchell
Thanks for the quick response and hint on multi-line code! I happen to be trying to send emails to a domain ending ex.com and it was constantly coming up with "sending fake email" in the console. Checked in the source code on GitHub and saw the offending code.
- KajMagnus @KajMagnus2020-02-25 13:59:03.244Z
Ok, yes I just had a look at your email address, and noticed this.
Probably the new open source version will be out on Sunday or early next week, so you won't notice this fix immediately.
(However if you want to upgrade a few days earlier to an a little-bit-less tested version, I can ping you a bit sooner.)
- Progresswith handling this problem