Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:sender_address in the examples can take to a SMTP error #196

Open
mdesantis opened this issue Nov 22, 2013 · 1 comment
Open

:sender_address in the examples can take to a SMTP error #196

mdesantis opened this issue Nov 22, 2013 · 1 comment
Labels
bug existing issue

Comments

@mdesantis
Copy link

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" <notifier@example.com>},
    :exception_recipients => %w{exceptions@example.com}
  }
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 %{<notifier@example.com>} 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

@ciastek
Copy link

ciastek commented Sep 28, 2015

Had to use :sender_address => %{Notifier <notifier@example.com>} instead of :sender_address => %{"Notifier" <notifier@example.com>} to make it work with Rails 4.2.4 and config.action_mailer.delivery_method = :sendmail.

@san650 san650 added the bug existing issue label Dec 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug existing issue
Projects
None yet
Development

No branches or pull requests

3 participants