Ruby on Rails
Tuesday, November 18, 2014
Take a look at:
-Rob
On 2014-Nov-18, at 15:22 , bradford li <bradfordli@gmail.com> wrote:
I am trying to set up a mailer to send myself notification methods. I am currently trying to get the mailer to send myself a simple message when I go to the URL `localhost:3000/send_mail`I am currently getting this error:Net::SMTPAuthenticationError in HomeController#send_mail534-5.7.9 Application-specific password requireddevelopment.rb:config.action_mailer.raise_delivery_errors = truehost = 'localhost:3000'config.action_mailer.default_url_options = { host: host }config.action_mailer.delivery_method = :smtpconfig.action_mailer.smtp_settings = {address: 'smtp.gmail.com',port: 587,domain: 'gmail.com',user_name: 'myemail@gmail.com',password: 'mypwd',authentication: 'plain',enable_starttls_auto: true }routes:match '/send_mail', to: "home#send_mail", via: "get"home controller:class HomeController < ApplicationControllerdef indexenddef send_mailActionMailer::Base.mail(:from => "me@example.com", :to => "myemail@gmail.com", :subject => "Contact request", :body => "test").deliver_nowrender nothing: trueendend--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/904d2d19-b058-4150-ba98-06279ce8c966%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment