sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.3k stars 575 forks source link

Mailcatcher does not catch any emails #501

Closed piscespieces closed 2 years ago

piscespieces commented 2 years ago
# development.rb

  # Devise
  config.action_mailer.default_url_options = {
    host: 'localhost:3000'
  }

  config.action_mailer.delivery_method = :smtp
  config.action_mailer_smtp_settings = { :address => '127.0.0.1', :port => 1025 }
  config.action_mailer.raise_delivery_errors = false
Started POST "/users/confirmation" for ::1 at 2022-05-18 19:34:59 -0400
19:35:00 web.1  |   ActiveRecord::SchemaMigration Pluck (1.8ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
19:35:00 web.1  | Processing by Devise::ConfirmationsController#create as TURBO_STREAM
19:35:00 web.1  |   Parameters: {"authenticity_token"=>"[FILTERED]", "user"=>{"email"=>"test@test.com"}, "commit"=>"Resend confirmation instructions"}
19:35:00 web.1  |   User Load (1.1ms)  SELECT "users".* FROM "users" WHERE "users"."email" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["email", "test@test.com"], ["LIMIT", 1]]
19:35:00 web.1  |   Rendering /Users/andresu/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/devise-4.8.1/app/views/devise/mailer/confirmation_instructions.html.erb
19:35:00 web.1  |   Rendered /Users/andresu/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/devise-4.8.1/app/views/devise/mailer/confirmation_instructions.html.erb (Duration: 1.0ms | Allocations: 920)
19:35:00 web.1  | Devise::Mailer#confirmation_instructions: processed outbound mail in 5.2ms
19:35:00 web.1  | Delivered mail 628582a41e0b5_de43b9c637fd@Andress-MBP.mail (2.8ms)
19:35:00 web.1  | Date: Wed, 18 May 2022 19:35:00 -0400
19:35:00 web.1  | From: please-change-me-at-config-initializers-devise@example.com
19:35:00 web.1  | Reply-To: please-change-me-at-config-initializers-devise@example.com
19:35:00 web.1  | To: test@test.com
19:35:00 web.1  | Message-ID: <628582a41e0b5_de43b9c637fd@Andress-MBP.mail>
19:35:00 web.1  | Subject: Confirmation instructions
19:35:00 web.1  | Mime-Version: 1.0
19:35:00 web.1  | Content-Type: text/html;
19:35:00 web.1  |  charset=UTF-8
19:35:00 web.1  | Content-Transfer-Encoding: 7bit
19:35:00 web.1  |
19:35:00 web.1  | <p>Welcome test@test.com!</p>
19:35:00 web.1  |
19:35:00 web.1  | <p>You can confirm your account email through the link below:</p>
19:35:00 web.1  |
19:35:00 web.1  | <p><a href="http://localhost:3000/users/confirmation?confirmation_token=KHc-54UVNyoMXuPxyrCh">Confirm my account</a></p>
19:35:00 web.1  |
19:35:00 web.1  | Redirected to http://localhost:3000/users/sign_in
19:35:00 web.1  | Completed 302 Found in 33ms (ActiveRecord: 8.4ms | Allocations: 30398)
19:35:00 web.1  |
19:35:00 web.1  |
19:35:00 web.1  | Started GET "/users/sign_in" for ::1 at 2022-05-18 19:35:00 -0400
19:35:00 web.1  | Processing by Devise::SessionsController#new as TURBO_STREAM
19:35:00 web.1  |   Rendering layout layouts/application.html.erb
19:35:00 web.1  |   Rendering /Users/andresu/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/devise-4.8.1/app/views/devise/sessions/new.html.erb within layouts/application
19:35:00 web.1  |   Rendered /Users/andresu/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/devise-4.8.1/app/views/devise/shared/_links.html.erb (Duration: 0.6ms | Allocations: 813)
19:35:00 web.1  |   Rendered /Users/andresu/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/devise-4.8.1/app/views/devise/sessions/new.html.erb within layouts/application (Duration: 3.0ms | Allocations: 3450)
19:35:00 web.1  |   Rendered layout layouts/application.html.erb (Duration: 19.6ms | Allocations: 23952)
19:35:00 web.1  | Completed 200 OK in 22ms (Views: 20.6ms | ActiveRecord: 0.0ms | Allocations: 25935)

I would appreciate the help or to point out possible config/setup that I might be missing? Followed docs and couple videos.

sj26 commented 2 years ago

Sorry I'm not sure what's going on there, but it does seem like rails isn't respecting your action mailer configuration for some reason. Did you restart your rails server etc? Have you searched for other places that might be fiddling with actionmailer settings? I'd grep -r action_mailer . for instance.

sj26 commented 2 years ago

Closing due to age, please re-open with more details if you identify an issue.