```ruby
require "action_mailer_config"
require "yaml"

path = "#{Rails.root}/config/mail.yml"
raise "Could not found ActionMailer config file: #{path}" unless File.exists? path
config_for_all = YAML.load_file(path)
raise "Could not found ActionMailer config for #{Raile.env.inspect}" unless config_for_all.has_key? Rails.env
ActionMailerConfig.load config_for_all(Rails.env)
```

Fix typo / Ignore config missing
user
```ruby
require "action_mailer_config"
require "yaml"

path = "#{Rails.root}/config/mail.yml"

config = if File.exists? path
  config_for_all = YAML.load_file(path)

  if config_for_all.has_key? Rails.env
    config_for_all[Rails.env]
  else
    warn "Could not found ActionMailer config for #{Rails.env.inspect}, use delivery_method: test"
    {}
  end
else
  warn "Could not found ActionMailer config file: #{path}, use delivery_method: test"
  {}
end

ActionMailerConfig.load config
```
assistant