아마도 찾을 수 있을 것 같지만, 이메일을 트리거한 Sidekiq 작업의 이름이 무엇인지 아시나요?
활성화 이메일을 받지 못해 사이트에 접근할 수 없는 경우, rake admin:create 명령을 사용하여 관리자 사용자 이름과 비밀번호를 생성할 수 있습니다. 자세한 지침은 여기에서 확인할 수 있습니다: Create an admin account from the console. 이를 통해 사이트에 로그인할 수 있을 것입니다.
늦게 답변드려 죄송합니다. 해당 문제를 트리거한 작업은 Jobs::CriticalUserEmail이었습니다.
따라서 가이드를 그대로 따랐습니다. 관리자 계정을 등록할 때 이메일이 전송되지 않았고, Jobs::CriticalUserEmail에는 {“type”=>“signup”, “user_id”=>1, “email_token”=>“REDACTED”, “to_address”=>nil, “current_site_id”=>“default”}가 포함되어 있었습니다.
문제를 확인하기 위해 관리자 계정을 강제 생성했습니다. 그 결과는 다음과 같습니다:
Doctor는 정상 작동하며 이메일이 수신됩니다.
Digest 테스트도 정상 작동하며 HTML 버전과 일반 텍스트 버전 모두 이메일이 수신됩니다.
어떤 등록을 하든 이메일이 전송되지 않으며, 관리자 섹션의 이메일 로그에는 이메일이 전송되었다는 메시지도 표시되지 않습니다.
사용자가 등록을 시도할 때마다 동일한 결과가 나타납니다:
Jobs::CriticalUserEmail에는 {“type”=>“signup”, “user_id”=>2, “email_token”=>“REDACTED”, “to_address”=>nil, “current_site_id”=>“default”}가 포함되어 있습니다.
/var/discourse/shared/standalone/log/rails/production.log의 끝부분은 다음과 같습니다(일부 정보는 마스킹 처리됨):
Processing by UsersController#check_username as JSON
Parameters: {"username"=>"bobo", "email"=>"REDACTED"}
Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 636)
Started GET "/session/csrf" for REDACTEDPUBLICIP at 2024-09-26 08:13:03 +0000
Processing by SessionController#csrf as JSON
Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 270)
Started POST "/u" for REDACTEDPUBLICIP at 2024-09-26 08:13:03 +0000
Processing by UsersController#create as */*
Parameters: {"name"=>"JJ", "email"=>"REDACTED", "password"=>"[FILTERED]", "username"=>"bobo", "password_confirmation"=>"[FILTERED]", "challenge"=>"REDACTED", "timezone"=>"Europe/London"}
Completed 200 OK in 335ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 23323)
Started POST "/login" for REDACTEDPUBLICIP at 2024-09-26 08:13:04 +0000
Processing by StaticController#enter as HTML
Parameters: {"username"=>"bobo", "password"=>"[FILTERED]", "redirect"=>"/u/account-created"}
Redirected to https://REDACTEDDOMAIN/u/account-created
Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 507)
Started GET "/u/account-created" for REDACTEDPUBLICIP at 2024-09-26 08:13:04 +0000
Processing by UsersController#account_created as HTML
Rendered layout layouts/application.html.erb (Duration: 14.0ms | Allocations: 4624)
Completed 200 OK in 21ms (Views: 15.1ms | ActiveRecord: 0.0ms | Allocations: 6821)
Started GET "/sidekiq/queues/critical" for REDACTEDPUBLICIP at 2024-09-26 08:13:15 +0000
로그에는 등록 파라미터에 정확한 이메일 주소가 표시되지만, Sidekiq에서는 여전히 “to_address”=>nil로 보고하고 있습니다.