No internet connection
  1. Home
  2. Issues

Mailer test address logic broken

By Graeme Mitchell @GraemeMitchell
    2020-02-25 13:33:10.048Z2020-02-25 13:46:35.602Z

    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")`
    • 3 replies
    1. 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 :- ) ``` )

      1. GGraeme Mitchell @GraemeMitchell
          2020-02-25 13:53:26.683Z

          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.

          1. 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.)

        • Progress
          with handling this problem
        • @KajMagnus marked this topic as Done 2020-08-03 19:53:43.586Z.