# I18n + ActionMailer = conflict?

**URL:** <https://www.ruby-forum.com/t/i18n-actionmailer-conflict/163878>\
**Category:** Rails\
**Created:** [March 25, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/i18n-actionmailer-conflict/163878 "2009-03-25T19:20:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [March 25, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/i18n-actionmailer-conflict/163878/1 "2009-03-25T19:20:27Z")

</div>

Hi there,

can anybody tell me why I get the error message:

“undefined method ‘t’ for #Mailer:0xb6d501e0”

… when I call the following Mailer?

=================================  
class Mailer \< ActionMailer::Base

def signup\_notification(user)  
@recipients = “#{user.email}”  
@from = APP\_CONFIG[‘mail’][‘sender’]

```
@subject = "#{APP_CONFIG['settings']['name']} - "
@subject += "#{ t('.activate_new_account') }."

@body[:user] = user
@body[:url] =

```

“http://#{APP\_CONFIG[‘settings’][‘domain’]}/activate/#{user.activation\_code}”  
@sent\_on = Time.now  
end

# end

(See the translation in the 2 “@subject” lines)

Does I18n have a problem with ActionMailer or what am I missing?

Thanks a bunch for any hint!  
Tom

---

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [March 25, 2009, 7:52pm UTC](https://www.ruby-forum.com/t/i18n-actionmailer-conflict/163878/2 "2009-03-25T19:52:06Z")

</div>

Ok, figured it out:

In a Mailer model, translations can not be accessed using the shortcut:

t(…)

You have to use it this way:

I18n.t(…)
