Reputation: 107
i am having troubles using the rails configuration adress in the mailer. I use the newest ruby and rails versions and want to add a mail adress from the configurations. i am using the folling code in the mailer file:
mail(to: Rails.configuration.email.sales , subject: 'Contact through jobs page')
on the development.rb page i am using this code:
config.email.sales = '[email protected]'
i dont understand why this isnt working. Would be great if you can help me. Thanks
Upvotes: 0
Views: 73
Reputation: 1016
Since you add that into development.rb that, you can try with something like:
mail(to: YourApplication::Application.config.email.sales,, subject: 'Contact through jobs page')
That will return '[email protected]', if you have that config.email.sales properly working :).
Upvotes: 1