I have mailer:
class AdminMailer < ActionMailer::Base
default :from => "pejottest@gmail.com"
def message
mail(:to => "pejottest@gmail.com",:subject => "test")
end
end
When I i use them from the controller :
def create
AdminMailer.message.deliver
redirect_to root_path
end
Then I got
SystemStackError in EmailsController#create
stack level too deep
Without any trace and so on.
I think you’ll find the
messagemethod is reserved by Action Mailer. I would recommend calling your method different from this to prevent this conflict.Thanks to Ben Lee in the comments for pointing out where this comes from.