I have configured items related to SMTP service in the app.yml configuration file, but I still cannot receive the activation email correctly

I have configured items related to SMTP service in the app.yml configuration file, but I still cannot receive the activation email correctly. Please provide some support.
Here are the logs I collected:
Rendered layouts/email_template.html.erb (Duration: 0.1ms | Allocations: 30)
Delivered mail ee2b5a91-0590-48f7-8c75-aa67d5e0d6dc@bbs.lynkage.cn (30001.9ms)
Job exception: execution expired

Could it be that notification email is not set correctly in /admin/site_settings/category/required?
Is the “Sending Method” configuration in /admin/email displayed correctly?

(Just guessing

Wait, your domain doesn’t even have an MX record…)

The problem must be in the docker configuration, because I have other services that can normally use my CMTP server to send emails. I don’t know where the /admin/site_settings/category/required you mentioned is, and I can’t find it.

Hello @liuyang,

Sorry to ask but can you please ask your question in English so the whole community can understand and help if they can?

Thanks! :wink:

3 Likes

http(s)://your_domain/admin/site_settings/category/required

http(s)://your_domain/admin/email

I am now unable to successfully log in to the forum as an administrator because I cannot receive an activation email when CREATING an administrator account

1 Like

emmm

You could try creating an admin by

cd /var/discourse
./launcher enter app

## in the container
rake admin:create
1 Like

Thanks for your help. Now I have successfully activated my administrator account through the command line, but I still cannot send emails through SMTP. I have successfully sent test emails through Telnet on the server, so I think there are some configuration items in app.yml that I am not clear about, which causes my problems

  DISCOURSE_SMTP_ADDRESS: smtp.qq.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: 1111111111111111111111111111111111@qq.com
  DISCOURSE_SMTP_PASSWORD: qq  smtp login Authorization code
  DISCOURSE_SMTP_AUTHENTICATION: login
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
  DISCOURSE_SMTP_ENABLE_START_TLS: true

Did you set DISCOURSE_NOTIFICATION_EMAIL in your app.yml or “notification email” in site settings?

image

3 Likes

Thank you very much. With your help, I successfully solved the problem :+1: