# How to inject an email using the rails console?

**URL:** https://meta.discourse.org/t/how-to-inject-an-email-using-the-rails-console/210428
**Category:** Support
**Created:** [November 29, 2021, 6:52pm UTC](https://meta.discourse.org/t/how-to-inject-an-email-using-the-rails-console/210428 "2021-11-29T18:52:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![dachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dachary/32/119731_2.png) [@dachary](https://meta.discourse.org/u/dachary)
#### Post date: [December 17, 2021, 1:00pm UTC](https://meta.discourse.org/t/how-to-inject-an-email-using-the-rails-console/210428/2 "2021-12-17T13:00:34Z")

</div>

I did not find an answer but found an acceptable fallback. I created a virgin discourse 2.7.9 instance moved the mail to be imported, [as instructed when importing mailboxes](https://meta.discourse.org/t/importing-mailing-lists-mbox-listserv-google-groups-emails/79773). It effectively imports the mail and by editing the `script/import_scripts/mbox/support/indexer.rb` file I was able to add a few **puts** statements here and there to get more information about the problem.

---

_[View the full topic](https://meta.discourse.org/t/how-to-inject-an-email-using-the-rails-console/210428)._
