exception_notification icon indicating copy to clipboard operation
exception_notification copied to clipboard

:sender_address in the examples can take to a SMTP error

Open mdesantis opened this issue 12 years ago • 1 comments

Using :sender_address as specified in the examples:

ExceptionNotification.configure do |config|
  # Email notifier sends notifications by email
  config.add_notifier :email, {
    :email_prefix         => "[ERROR] ",
    :sender_address       => %{"Notifier" <[email protected]>},
    :exception_recipients => %w{[email protected]}
  }
end

I get this error:

.rbenv/versions/2.1.0-preview1/lib/ruby/2.1.0/net/smtp.rb:956:in `check_response': 501 Incorrect Address Format (Net::SMTPSyntaxError)
  from .rbenv/versions/2.1.0-preview1/lib/ruby/2.1.0/net/smtp.rb:925:in `getok'
  from .rbenv/versions/2.1.0-preview1/lib/ruby/2.1.0/net/smtp.rb:840:in `mailfrom'
  from .rbenv/versions/2.1.0-preview1/lib/ruby/2.1.0/net/smtp.rb:661:in `send_message'

Changing :sender_address to %{<[email protected]>} fixes the error.

I don't know if the problem is related to Ruby 2.1.0 or to the SMTP server (I think it is related to the SMTP server because I tried with mailcatcher and it works), but maybe there could be some infos about this in the readme, maybe in a Troubleshooting section

mdesantis avatar Nov 22 '13 15:11 mdesantis

Had to use :sender_address => %{Notifier <[email protected]>} instead of :sender_address => %{"Notifier" <[email protected]>} to make it work with Rails 4.2.4 and config.action_mailer.delivery_method = :sendmail.

ciastek avatar Sep 28 '15 13:09 ciastek