Configure Rails action_mailer on c9

rails

#1

I’m having some trouble getting action_mailer configured correctly on c9. I have a feeling it’s due to improper setting in my development.rb file for action mailer.

I’m attempting to use:

config.action_mailer.default_url_options = { :host => “allychat-swachtma.c9users.io” }

I’m not getting any errors in my application, but mail never arrives either.

Log file after triggering a password rest w/ Devise:

=> Booting Puma
=> Rails 5.0.0 application starting in development on http://0.0.0.0:8080
=> Run rails server -h for more startup options
Puma starting in single mode…

  • Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://0.0.0.0:8080
    Use Ctrl-C to stop
    Started POST “/users/password” for 66.188.12.195 at 2016-08-15 13:58:02 +0000
    Cannot render console from 66.188.12.195! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
    ActiveRecord::SchemaMigration Load (0.6ms) SELECT “schema_migrations”.* FROM “schema_migrations"
    Processing by Devise::PasswordsController#create as HTML
    Parameters: {“utf8”=>“✓”, “authenticity_token”=>“X0aQeHQUGGfxqcJXkL8PhKCwxrrJP0xDJzfDlz43XzGHM3JFXaFp4ULLz8lI471HR9cgsEeEg1fa/fSzztSBIA==”, “user”=>{“email”=>"swachtma@gmail.com”}, “commit”=>“Send me reset password instructions”}
    User Load (1.2ms) SELECT “users”.* FROM “users” WHERE “users”.“email” = $1 ORDER BY “users”.“id” ASC LIMIT $2 [[“email”, "swachtma@gmail.com"], [“LIMIT”, 1]]
    User Load (0.6ms) SELECT “users”.* FROM “users” WHERE “users”.“reset_password_token” = $1 ORDER BY “users”.“id” ASC LIMIT $2 “reset_password_token”, “389a8d1234d644b5079990bfb293cb7f901546b000c0e2f592e26c04d1e8802e”], [“LIMIT”, 1]]
    (0.1ms) BEGIN
    SQL (0.5ms) UPDATE “users” SET “reset_password_token” = $1, “reset_password_sent_at” = $2, “updated_at” = $3 WHERE “users”.“id” = $4 [[“reset_password_token”, “389a8d1234d644b5079990bfb293cb7f901546b000c0e2f592e26c04d1e8802e”], [“reset_password_sent_at”, 2016-08-15 13:58:02 UTC], [“updated_at”, 2016-08-15 13:58:02 UTC], [“id”, 4]]
    (3.1ms) COMMIT
    Rendering devise/mailer/reset_password_instructions.html.haml
    Rendered devise/mailer/reset_password_instructions.html.haml (17.1ms)
    Devise::Mailer#reset_password_instructions: processed outbound mail in 344.7ms
    Sent mail to swachtma@gmail.com (47.6ms)
    Date: Mon, 15 Aug 2016 13:58:03 +0000
    From: please-change-me-at-config-initializers-devise@example.com
    Reply-To: please-change-me-at-config-initializers-devise@example.com
    To: swachtma@gmail.com
    Message-ID: 57b1ca6bb6397_2cf95fc98c4875b0@swachtma-allychat-3595829.mail
    Subject: Reset password instructions
    Mime-Version: 1.0
    Content-Type: text/html;
    charset=UTF-8
    Content-Transfer-Encoding: 7bit

Hello swachtma@gmail.com!

Someone has requested a link to change your password. You can do this through the link below.

Change my password

If you didn't request this, please ignore this email.

Your password won't change until you access the link above and create a new one.

Redirected to
Completed 302 Found in 1558ms (ActiveRecord: 8.9ms)