# המייל:משימת ה-rake לבדיקה לא אמורה לדווח על מסירה מוצלחת כאשר המייל מושבת

**URL:** <https://meta.discourse.org/t/the-emails-test-rake-task-should-not-report-successful-delivery-when-email-is-disabled/185109>\
**Category:** Bug\
**Created:** [1 באפריל,‏ 2021,‏ 2:12pm UTC](https://meta.discourse.org/t/the-emails-test-rake-task-should-not-report-successful-delivery-when-email-is-disabled/185109 "2021-04-01T14:12:32Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [8 ביולי,‏ 2021,‏ 11:27pm UTC](https://meta.discourse.org/t/the-emails-test-rake-task-should-not-report-successful-delivery-when-email-is-disabled/185109/6 "2021-07-08T23:27:09Z")

</div>

I couldn’t repro the message not sending due to `SiteSetting.disable_emails`, but I did change the script to only report success if an `EmailLog` was returned, and an extra warning for the `disable_emails` setting.

```plaintext
$ bin/rake 'emails:test[]'
Testing sending to using localhost:1025, username: with auth.
SMTP server connection successful.
Sending to . . . 
Mail was not sent.

Reason: message.to is blank

### WARNING
The `disable_emails` site setting is currently set to non-staff.
Consider changing it to 'no' before performing any further troubleshooting.

```

and

```plaintext
Sending to michael@example.com. . . 
Mail accepted by SMTP server.
Message-ID: dfaf1c88-aab6-474b-b50c-8c500afb6291@localhost

If you do not receive the message, check your SPAM folder
[...]

```

[https://github.com/discourse/discourse/pull/13674](https://github.com/discourse/discourse/pull/13674)

---

_[View the full topic](https://meta.discourse.org/t/the-emails-test-rake-task-should-not-report-successful-delivery-when-email-is-disabled/185109)._
