# Action Mailer does not raise exceptions with Rails 2.3.2

**URL:** <https://www.ruby-forum.com/t/action-mailer-does-not-raise-exceptions-with-rails-2-3-2/166719>\
**Category:** Rails\
**Created:** [April 28, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/action-mailer-does-not-raise-exceptions-with-rails-2-3-2/166719 "2009-04-28T22:16:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![railzman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@railzman](https://www.ruby-forum.com/u/railzman)\
**Post date:** [April 28, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/action-mailer-does-not-raise-exceptions-with-rails-2-3-2/166719/1 "2009-04-28T22:16:43Z")

</div>

Hi,  
I am trying to have ActionMailer raise exceptions with rails 2.3.2 but  
it does not.

In development.rd I have  
config.action\_mailer.raise\_delivery\_errors = true

I tought it was due to a misconfiguration, so I modified  
deliver! in /usr/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/  
action\_mailer/base.rb  
to always raise any exceptions, but still no exceptions are raised.

How to repeat:

- create a new rails app with 2.3.2
- script/generate a new mailer with one method
- configure development.rb: config.action\_mailer.raise\_delivery\_errors  
= true
- make sure that one method should raise an exception (i.e. wrong  
address)
- call the method and…  
no exception is raised.

Same thing on 2.2.2 raises the exception.

Anyone with this problem?

---

<div class="post-metadata">

**Author:** ![railzman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@railzman](https://www.ruby-forum.com/u/railzman)\
**Post date:** [April 29, 2009, 3:45am UTC](https://www.ruby-forum.com/t/action-mailer-does-not-raise-exceptions-with-rails-2-3-2/166719/2 "2009-04-29T03:45:38Z")

</div>

I’m running on OSX with either ruby 1.8.7 or 1.9.2dev and rails  
2.3.2. Forcing a mail error with

config.action\_mailer.raise\_delivery\_errors = true

causes a long message to appear in my log that starts:

Net::SMTPAuthenticationError (535-5.7.1 Username and Password not  
accepted. Learn more at  
):  
/opt/local/lib/ruby/1.8/net/smtp.rb:942:in `check_auth_response' /opt/local/lib/ruby/1.8/net/smtp.rb:733:in`auth\_plain’  
/opt/local/lib/ruby/1.8/net/smtp.rb:725:in `send' /opt/local/lib/ruby/1.8/net/smtp.rb:725:in`authenticate’  
/opt/local/lib/ruby/1.8/net/smtp.rb:566:in `do_start' /opt/local/lib/ruby/1.8/net/smtp.rb:525:in`start’  
app/models/user\_observer.rb:3:in `after\_create’

and goes on from there.
