1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

10 commits

Author SHA1 Message Date
George Claghorn
22f3dfe3cb
Upload raw email before creating pending ActionMailbox::InboundEmail
Fix that a storage upload error would leave behind a stuck-pending ActionMailbox::InboundEmail that could never be processed. The message isn't lost: the SMTP relay sees an HTTP server error and defers message delivery. We just have spurious, non-actionable InboundEmails stuck pending and tripping monitoring.

This does still leave behind an unattached ActiveStorage::Blob with no corresponding object on the storage service, but that's less annoying.
2021-01-04 09:28:09 -05:00
George Claghorn
11738e82cd Extract ActionMailbox::Record
Permit applications to hack in custom DB config for ActionMailbox::InboundEmail until Action Mailbox has first-class multi-DB support:

ActiveSupport.on_load(:action_mailbox_record) do
  connects_to reading: :action_mailbox_replica, writing: :action_mailbox_primary
end
2020-09-29 11:59:14 -04:00
Takayuki Nakata
fffb2b2a11 Fix typo in ActionMailbox::InboundEmail::MessageId [ci skip]
- `a Active Storage` -> `an Active Storage`
- `which be uploaded` -> `which is uploaded`
2019-09-17 17:40:49 +09:00
Pratik
d0037daa37 Allow skipping incineration of processed emails 2019-02-06 19:28:49 -05:00
Pratik Naik
5cd733a334 Ensure Action Mailbox processes an email only once when received multiple times
This also adds a new column, message_checksum, to the action_mailbox_inbound_emails table
for storing SHA1 digest of the email source. Additionally, it makes generating the missing
message id deterministic and adds a unique index on message_checksum and message_id to
detect duplicate emails.
2019-01-17 11:13:40 -06:00
colorbox
620ba4c12a Fix document formatting on ActionMailbox [ci skip]
Use `+` instead of backquote.
2019-01-17 01:10:21 +09:00
George Claghorn
04d091209a Add load hook for ActionMailbox::InboundEmail 2018-12-31 10:05:13 -05:00
bogdanvlviv
3adb261985
Fix Ruby warnings in actionmailbox
```
rails/actionmailbox$ bundle exec rake tests
(snip)
...
rails/activerecord/lib/active_record/persistence.rb:48: warning: in `create!':
the last argument was passed as a single Hash
rails/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb:21:
warning: although a splat keyword arguments here
...
(snip)
```
2018-12-27 01:30:29 +02:00
George Claghorn
6c168aaffb Nest Action Mailbox classes in the API docs 2018-12-26 16:18:42 -05:00
George Claghorn
a5b2fff64c Import Action Mailbox 2018-12-25 21:32:35 -05:00