pfaffman
(Jay Pfaffman)
December 10, 2018, 6:53pm
1
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
rishabh
December 17, 2018, 1:13pm
4
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:
allow an admin to send a test email to ANY email address
allow an admin to send a test email to any user (not just admins)
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.
def server_settings
data = { delivery_method: delivery_method, settings: delivery_settings }
render_json_dump(data)
end
def test
params.require(:email_address)
begin
message = TestMailer.send_test(params[:email_address])
Email::Sender.new(message, :test_message).send
render json: { sent_test_email_message: I18n.t("admin.email.sent_test") }
rescue => e
render json: { errors: [e.message] }, status: :unprocessable_entity
end
end
def preview_digest
params.require(:last_seen_at)
params.require(:username)
5 Likes
sam
(Sam Saffron)
December 17, 2018, 4:37pm
5
Sure… go with (1) sounds fine to me.
5 Likes
rishabh
December 19, 2018, 3:49am
6
This is now merged, thanks @pfaffman
committed 03:12PM - 18 Dec 18 UTC
5 Likes