# Failing to send emails, undefined method with\_secure\_media

**URL:** https://meta.discourse.org/t/failing-to-send-emails-undefined-method-with-secure-media/135323
**Category:** Support
**Created:** [December 6, 2019, 11:21pm UTC](https://meta.discourse.org/t/failing-to-send-emails-undefined-method-with-secure-media/135323 "2019-12-06T23:21:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)
#### Post date: [December 6, 2019, 11:21pm UTC](https://meta.discourse.org/t/failing-to-send-emails-undefined-method-with-secure-media/135323/1 "2019-12-06T23:21:37Z")

</div>

In my dashboard, I see:

```plaintext
There are 1409 email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. See the failed jobs in Sidekiq.

```

 ![Screen Shot 2019-12-06 at 3.19.02 PM](https://global.discourse-cdn.com/meta/original/3X/0/6/06558bf9b593e456b0c51bd1d97f155898c2c08e.png)

When I click through to the failed jobs, I see

```plaintext
Jobs::HandledExceptionWrapper: Wrapped NoMethodError: undefined method `with_secure_media?' for #<Post:0x00007f48bd49d9c0>

```

 ![Screen Shot 2019-12-06 at 3.17.51 PM](https://global.discourse-cdn.com/meta/original/3X/a/e/aedf6d29ae17b89ae8c9073ce877c1ff58df67ee.png)

The problem seems to correlate with an upgrade to v2.4.0.beta8.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [December 6, 2019, 11:31pm UTC](https://meta.discourse.org/t/failing-to-send-emails-undefined-method-with-secure-media/135323/2 "2019-12-06T23:31:33Z")

</div>

I’d first to a rebuild from the command line.

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)
#### Post date: [December 6, 2019, 11:44pm UTC](https://meta.discourse.org/t/failing-to-send-emails-undefined-method-with-secure-media/135323/3 "2019-12-06T23:44:20Z")

</div>

Already did the rebuild and didn’t notice a change initially. But now that I’ve rechecked the dashboard, I’m seeing the number of failed jobs falling.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 5, 2020, 11:45pm UTC](https://meta.discourse.org/t/failing-to-send-emails-undefined-method-with-secure-media/135323/4 "2020-01-05T23:45:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
