Comments (2)
There is an open issue: #39364. Seems like Rails currently does not support SES. See supported providers here: https://guides.rubyonrails.org/action_mailbox_basics.html. Here is the minimal test case to reproduce this problem:
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails"
# If you want to test against edge Rails replace the previous line with this:
# gem "rails", github: "rails/rails", branch: "main"
gem "sqlite3"
end
require "active_record/railtie"
require "active_storage/engine"
require "action_mailbox/engine"
require "tmpdir"
class TestApp < Rails::Application
config.load_defaults Rails::VERSION::STRING.to_f
config.root = __dir__
config.hosts << "example.org"
config.eager_load = false
config.session_store :cookie_store, key: "cookie_store_key"
config.secret_key_base = "secret_key_base"
config.logger = Logger.new($stdout)
Rails.logger = config.logger
config.active_storage.service = :local
config.active_storage.service_configurations = {
local: {
root: Dir.tmpdir,
service: "Disk"
}
}
config.action_mailbox.ingress = :relay
end
ENV["DATABASE_URL"] = "sqlite3::memory:"
Rails.application.initialize!
require ActiveStorage::Engine.root.join("db/migrate/20170806125915_create_active_storage_tables.rb").to_s
require ActionMailbox::Engine.root.join("db/migrate/20180917164000_create_action_mailbox_tables.rb").to_s
ActiveRecord::Schema.define do
CreateActiveStorageTables.new.change
CreateActionMailboxTables.new.change
end
class ApplicationMailbox < ActionMailbox::Base
routing (/^report@/i) => :dmarc_report
end
class DmarcReportMailbox < ActionMailbox::Base
def process
$attachments = mail.attachments
end
end
require "minitest/autorun"
class DmarcReportMailboxTest < ActionMailbox::TestCase
setup do
source = <<~SOURCE
From: [email protected]
To: [email protected]
OTAzOTkueG1sUEsFBgAAAAABAAEAYAAAAFUCAAAAAA==
SOURCE
@inbound_email = receive_inbound_email_from_source(source)
end
test "the email has an attachment" do
assert_equal $attachments.size, 1
end
end
from rails.
@bparanj I'm using action_mailbox_amazon_ingress and I've tried the branch from that PR, neither handles this specific problem.
Given the raw email is handed off to Action Mailbox for processing, are you suggesting that SES structures emails in a way that is different from other providers? If so, do you happen to know of any examples of how this is handed by other providers? Given the SES/SNS PR has been running for 4 years, I'd be interested in helping to get this fixed, but I can't say I know much about email standards
from rails.
Related Issues (20)
- Unexpected controller prefix path de-duplication in view partial lookup paths HOT 2
- `ActiveStorage::Analyzer::VideoAnalyzerTest#test_analyzing_a_rotated_HDR_video` fails at Rails Nightly HOT 9
- Upgrading Rails 7.0.8 to 7.1.3 broke ActionText attachments in development
- Rails 7.1 doesn't render Enumerator in view correctly HOT 7
- Rails 7.1 undefined method purge & same for variant using ruby 3.3.0-dev HOT 1
- Add ability to see on which shard the migration is being run HOT 2
- Should there be a RAILS_MASTER_KEY_DUMMY like SECRET_KEY_BASE_DUMMY? HOT 2
- ActiveStorage::IntegrityError (ActiveStorage::IntegrityError)
- Destroying bi-directional has_one through association only works from one end HOT 4
- esbuild precompilation error in rails 7.1.3 HOT 2
- [Bug][7.1+] Development of "Add validation option for enum" is incomplete HOT 3
- `ActiveRecord::Store` with JSON column uses `nil` as default value instead of `{}`
- `ActiveRecord::Attributes::ClassMethod#attribute` `default:` proc should be evaluated in subclass or instance context HOT 2
- Improve ActiveStorage Proxy Documentation
- Enums should accept a proc for `default` HOT 3
- rails new fails if bootsnap is missing from the Gemfile used to run the 'rails new' command (updated) HOT 3
- counter_cache doesn't work with composite PKs HOT 1
- Active Record marks attributes as `came_from_user?` after `dup`
- Active Record marks attributes as `_changed?` after `dup`ing a persisted instance HOT 1
- ActiveSupport::TimeZone.new raises ArgumentError HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.