设置电子邮件时出现问题:Job异常:Net::SMTPAuthenticationError

显然,这与我的电子邮件配置有关。我正在学习设置自己的 Discourse 实例,目前是在 Digital Ocean 上作为 droplet。我已经设置好了实例,并且可以通过 jordanviolet.dev 访问。

我已按照故障排除文档进行操作,但没有成功:

我希望使用我的 Google Workspace (gmail) 帐户作为我的电子邮件提供商。以下是我的 smtp 电子邮件设置:

## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'jordan@violetfamily.com'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: smtp-relay.gmail.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: myemail@violetfamily.com
  DISCOURSE_SMTP_PASSWORD: "myemailpassword"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: violetfamily.com
  DISCOURSE_NOTIFICATION_EMAIL: jordan@violetfamily.com

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

我认为我也正确遵循了 Google 关于 SMTP 中继的文档:

以下是我的 Workspace > Gmail > 路由设置中的设置:


对于遇到此问题的所有用户,解决方案是同时在我的 Google Workspace 和我希望电子邮件来自的个人帐户中启用安全性较低的应用。

此主题的第 4 步:

3 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.