Similar to Email test area should warn if emails are disabled
This is misleading:
$ rake 'emails:test[michael@example.com]'
Testing sending to michael@example.com using mx-out:25.
SMTP server connection successful.
Sending to michael@example.com. . .
Mail accepted by SMTP server.
If you do not receive the message, check your SPAM folder
or test again using a service like http://www.mail-tester.com/.
If the message is not delivered it is not a problem with Discourse.
Check the SMTP server logs to see why it failed to deliver the message.
In this case, no email was sent since SiteSetting.disable_emails == "non-staff"
.
We should warn about this in the rake task. Do we want to:
- add logic to
Email::Sender#send
that returns a value indicating whether the message was sent (e.g. sent, skipped, disabled, no_message) - or, add logic to the
emails:test
task that tests only fordisable_emails
?