# Action Mailer throwing underscores on template name

**URL:** <https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978>\
**Category:** Rails\
**Created:** [March 4, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978 "2008-03-04T22:52:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![starmaerker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Post date:** [March 4, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978/1 "2008-03-04T22:52:23Z")

</div>

I’ve recently run into a problem with one of my applications that  
refuses to send emails using ActionMailer.

Looking at the log, it become obvious what’s happening, the system is  
looking for templates with underscores at the end. Notice the  
exception\_notification\_ .

For example:  
ActionView::ActionViewError (No rhtml, rxml, rjs or delegate template  
found for exception\_notification\_ in /var/rails/nick\_warren/releases/  
20080303165433/vendor/plugins/exception\_notification/lib/…/views/  
exception\_notifier):  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action\_view/  
base.rb:401:in `find_template_extension_for' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_view/ base.rb:332:in`pick\_template\_extension’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action\_view/  
base.rb:249:in `render_file' (eval):4:in`render\_message’  
/usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.6/lib/action\_mailer/  
base.rb:424:in `create!' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.6/lib/action_mailer/ base.rb:385:in`initialize’  
/usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.6/lib/action\_mailer/  
base.rb:333:in `new' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.6/lib/action_mailer/ base.rb:333:in`method\_missing’  
/var/rails/nick\_warren/releases/20080303165433/vendor/plugins/  
exception\_notification/lib/exception\_notifiable.rb:95:in  
`rescue\_action\_in\_public’

obviously this comes from the exception notifier plugin:

ExceptionNotifier.deliver\_exception\_notification(exception, self,  
request, data)

Has anybody else seen this? Any ideas on how to get this working?

Thanks,

Andrew

---

<div class="post-metadata">

**Author:** ![starmaerker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Post date:** [March 5, 2008, 12:39am UTC](https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978/2 "2008-03-05T00:39:24Z")

</div>

For what it’s worth…

First, try using your own ActionMailer model and sending an email, to  
see if it fails.

Second, have you updated exception\_notification? Do so, especially if  
you rails version has changed.

---

<div class="post-metadata">

**Author:** ![starmaerker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e9bcb4/32.png) [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Post date:** [March 5, 2008, 2:20am UTC](https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978/3 "2008-03-05T02:20:52Z")

</div>

i had a similar problem after using a 3rd party plugin which did some  
internationalization things that overrode the actionmailer method for  
finding the template so it could append a localization label eg. \_uk  
or \_fr or whatever. Check you haven’t got something like that going  
on…though i can’t see it in the stack trace there.
