Action Mailbox - way to manually feed email

Is there a way to process an email by manually copying/piping/catting an email without the use of an MTA ? For example, assume I have a directory of email already received through my MTA (postfix in my case) and I want to process those email messages through ActionMailbox. I’d like to do something like

cat ~/jeff.eml | bin/rails action_mailbox:ingress:postfix URL=http://whp.myurl.com/rails/action_mailbox/relay/inbound_emails INGRESS_PASSWORD=‘???’

``

That results in an error

No template found for ActionMailbox::Ingresses::Relay::InboundEmailsController#create, rendering head :no_content

``

I have a catch-all route pointed at archive_mailbox that works fine with email forwarded by postfix, but the manual email never reaches that mailbox. From the log, I can tell that it does see the message_id as the last thing it does is insert into action_mailbox_inbound_emails which is then rolled back. A log entry at the beginning of archive_mailbox never appears in the log.

I’d appreciate any ideas. Thx.

I’ve had the exact same issue. This happens when the message you send to the ingress endpoint has already been indexed in the past. It does a checksum test to prevent rerouting the same message a second time. If you send a new message it should work.

The error we got is because no template is defined for the controller, which seems completely normal.

Out the box framework for handling inbound emails MyIndigoCard

I’m torn, it’s a handy thing, cuts out alot of faff and builds on the rails philosophy of letting you crack on and build things.

But is this the kind of feature that should be in the core of rails?

Thanks for the information

Thank for taking intrest