Our Rails Application using ExceptionNotifier Gem
and change configuration file
Exception Mail is working good
But sender mail is not Noreply < noreply@our_domain.com >
Always sender is my email_address
My production.rb file is
config.log_formatter = ::Logger::Formatter.new
config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[Exception ",
:sender_address => %{"Noreply" <noreply@our_domain.com>},
:exception_recipients => %w{[email protected]}
}
And setup_mailer.rb file is
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "our_domain.com",
:user_name => "my_eamail@our_domain.com",
:password => "PASSWORD",
:authentication => "login",
:enable_starttls_auto => true
}
why sender address not change???
If you authenticate using the Gmail SMTP account, Gmail will override the sender to your Gmail account. They don't allow you to use their SMTP to send emails from a different domain.