ruby on rails - `method_missing': undefined method `add_delivery_method' for ActionMailer::Base:Class -


Hi I'm trying to start the ActionMailer :: base: Class with some data:

  ActionMailer :: Base.add_delivery_method: Session, AWS :: SES :: Base ,: access_key_id = & gt; '0PxxxxxxxxxxxxS8Dyyy' ,: secret_access_key = & gt; 'AJxxxxxxxxxxxxx2Tpppa + ZQ6ddddddkN2'   

but it throws an error:

  `method_missing: 'Undefined method` add_delivery_method' for Base: ActionMailer :: Base (NoMethodError)   

My Rail version - 3.2.13

What am I doing wrong < P>

Most likely, whatever you are trying to do should be in an environment file, that is, config / environment / Production.rb . Do it like this:

  config.action_mailer.delivery_method =: smtp config.action_mailer.smtp_settings = {: address = & gt; "Email-smtp.us-east-1.amazonaws.com" ,: user_name = & gt; "..." # Your SMTP user here : Password = & gt; "...", # your SMTP password here : Authentication = & gt; : Login,: enable_starttls_auto = & gt; True}   

Did you take a look at this question :?

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -