Heroku support said this was a undocumented feature: I just had to remove and re-add the sendgrid addon and all works correctly afterwards.
(Kind of like taking your broken toaster apart and putting it back together, and having it magically start to work.) Tom P. On Jan 31, 7:10 pm, tomPorter <[email protected]> wrote: > I tried a couple of things first: > - Tried using gmail_smtp addon, got weird error about it only being > available to beta testers. > - Tried setting up my own actionmailer entries in environment.rb, but > as Heroku uses ruby 1.8.6, it blows up on needing to send tls-start > first. Requires lots of work to get this to run with gmail. > - Added the sendgrid addon at Heroku, removed all actionmailer info in > environment.rb. > > I made NO chages to my app to do anything with mailer. heroku says > that you have to furnish a from address. > > So I changed Models/UserMailer.rb to look like this: > class UserMailer < ActionMailer::Base > > def forgot_password(user, key) > host = Hobo::Controller.request_host > app_name = Hobo::Controller.app_name || host > @subject = "#{app_name} -- forgotten password" > @body = { :user => user, :key => key, :host => > host, :app_name => app_name } > @recipients = user.email_address > @from = "[email protected]" #hard coded instead of > hobo generated. > @sent_on = Time.now > @headers = {} > end > > Ran from heroku console: > > >> l = User.find(2) > > => #<User id: 2, crypted_password: nil, salt: nil, remember_token: > nil, remember_token_expires_at: nil, name: "L Porter", email_address: > "[email protected]", administrator: true, created_at: "2010-01-31 > 22:08:00", updated_at: "2010-01-31 23:45:49", state: "active", > key_timestamp: "2010-01-31 23:45:49"> > > >> UserMailer.deliver_forgot_password(l,"foo") > > Net::SMTPAuthenticationError: 535 5.7.8 Error: authentication failed: > generic failure > > >> exit > > I'm getting this traceback in my heroku log: > > Processing UsersController#forgot_password (for 24.149.54.195 at > 2010-01-31 15:10:56) [POST] > Parameters: {"page_path"=>"users/forgot_password", > "action"=>"forgot_password", "authenticity_token"=>"cant tell you", > "controller"=>"users", "email_address"=>"[email protected]"} > Sent mail to [email protected] > > Net::SMTPAuthenticationError (535 5.7.8 Error: authentication failed: > generic failure > ): > /usr/local/lib/ruby/1.8/net/smtp.rb:576:in `auth_plain' > /usr/local/lib/ruby/1.8/net/smtp.rb:570:in `__send__' > /usr/local/lib/ruby/1.8/net/smtp.rb:570:in `authenticate' > /usr/local/lib/ruby/1.8/net/smtp.rb:410:in `do_start' > /usr/local/lib/ruby/1.8/net/smtp.rb:377:in `start' > app/models/user.rb:28 > hobo (0.9.106) lib/hobo/lifecycles/actions.rb:78:in `instance_eval' > hobo (0.9.106) lib/hobo/lifecycles/actions.rb:78:in `fire_event' > hobo (0.9.106) lib/hobo/lifecycles/transition.rb:51:in `run!' > hobo (0.9.106) lib/hobo/permissions.rb:171:in `with_acting_user' > hobo (0.9.106) lib/hobo/lifecycles/transition.rb:47:in `run!' > hobo (0.9.106) lib/hobo/lifecycles/lifecycle.rb:129:in `transition' > (eval):3:in `request_password_reset!' > hobo (0.9.106) lib/hobo/user_controller.rb:144:in > `hobo_forgot_password' > hobo (0.9.106) lib/hobo/user_controller.rb:45:in `forgot_password' > hobo (0.9.106) lib/hobo/controller.rb:23:in `call' > hobo (0.9.106) lib/hobo/controller.rb:23:in `included_in_class' > /home/heroku_rack/lib/static_assets.rb:9:in `call' > /home/heroku_rack/lib/last_access.rb:25:in `call' > /home/heroku_rack/lib/date_header.rb:14:in `call' > thin (1.0.1) lib/thin/connection.rb:80:in `pre_process' > thin (1.0.1) lib/thin/connection.rb:78:in `catch' > thin (1.0.1) lib/thin/connection.rb:78:in `pre_process' > thin (1.0.1) lib/thin/connection.rb:57:in `process' > thin (1.0.1) lib/thin/connection.rb:42:in `receive_data' > eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine' > eventmachine (0.12.6) lib/eventmachine.rb:240:in `run' > thin (1.0.1) lib/thin/backends/base.rb:57:in `start' > thin (1.0.1) lib/thin/server.rb:150:in `start' > thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start' > thin (1.0.1) lib/thin/runner.rb:173:in `send' > thin (1.0.1) lib/thin/runner.rb:173:in `run_command' > thin (1.0.1) lib/thin/runner.rb:139:in `run!' > thin (1.0.1) bin/thin:6 > /usr/local/bin/thin:20:in `load' > /usr/local/bin/thin:20 > > Rendering /disk1/home/slugs/124604_f0083be_dc42/mnt/public/500.html > (500 Internal Server Error) > > Anyone else seen this? > > Tom P. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
