Allow sending test emails when mail is disabled?

Now that we allow sending mail to admins when mail is disabled, might we enable sending mail go ANY address in the mail test field? I’ve been wondering for longer than I care to admin why none of my mail tests were appearing in the Mailgun logs.

It turns out mail is disabled, and the mail test silently fails. Nothing in logs, nothing in skipped. I was just writing a mean note to Mailgun when I figured out how it was my fault.

3 Likes

Hmm yeah we should add an explicit warning here @sam can you assign this out?

3 Likes

This is indeed a bit unpredictable, when disable email is set to non-staff,

  • sending a test mail to an admin email works as expected.
  • sending a test mail to any non-admin email fails silently.

IMO, we could:

  1. allow an admin to send a test email to ANY email address
  2. allow an admin to send a test email to any user (not just admins)
  3. add a warning that a test email can only be sent to another admin

I like Option 1 because it’s the most obvious but 2 and 3 would also help make this less confusing.

https://github.com/discourse/discourse/blob/master/app/controllers/admin/email_controller.rb#L16

5 Likes

Sure… go with (1) sounds fine to me.

5 Likes

This is now merged, thanks @pfaffman :partying_face:

https://github.com/discourse/discourse/commit/c279792130e24dffbbdee8d6cbb0bad46cc13b72

5 Likes