gpt4 book ai didi

email - Gitlab 设置不发送电子邮件

转载 作者:行者123 更新时间:2023-12-03 04:28:54 26 4
gpt4 key购买 nike

我正在尝试在 Windows Azure 中设置 GitLab。我关注了这个博客Setup GitLab in azure它正在发挥魅力。但我无法配置通过 GitLab 发送 smtp 邮件。

  • 我已遵循此设置 SMTP Setup 。尝试了 Gmail 和 Zoho,端口均为 465 和 587

我收到以下错误

2016-09-21_09:44:28.55626 2016-09-21T09:44:28.556Z 13562 TID-vskyw WARN: {"class":"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper","wrapped":"ActionMailer::DeliveryJob","queue":"mailers","args":[{"job_class":"ActionMailer::DeliveryJob","job_id":"6a954ac7-19d6-4b27-b28c-c511f25e6896","queue_name":"mailers","arguments":["DeviseMailer","confirmation_instructions","deliver_now",{"_aj_globalid":"gid://gitlab/User/1"},"tgShkQTx5e1sALoxkkGi",{"to":"<my email here>","_aj_symbol_keys":["to"]}],"locale":"en"}],"retry":true,"jid":"cbd7dc87ce4202265d1a6be7","created_at":1474450319.7324607,"enqueued_at":1474451065.2083879,"error_message":"end of file reached","error_class":"EOFError","failed_at":1474450320.9358478,"retry_count":5,"retried_at":1474451068.5555682}

2016-09-21_09:44:28.55639 2016-09-21T09:44:28.556Z 13562 TID-vskyw 警告:EOFError:已到达文件末尾

  • 我尝试了 SSL 和 TLS 的各种组合,但还没有成功!

我正在使用 GitLab 8.11.7

如有任何帮助,我们将不胜感激。

更新:

我尝试使用 GMail smtp,在允许使用此 URL 访问应用程序后,它工作正常。 。此问题可能是由于 Zoho 的某些 smtp 策略所致

最佳答案

您应该使用新的 smtp 配置

If you're installing from source and use SMTP to deliver mail, you will need to add the following line to config/initializers/smtp_settings.rb:

ActionMailer::Base.delivery_method = :smtp

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/8.10-to-8.11.md#smtp-configuration 中所示

smtp_settings.rb 的配置示例是:

if Rails.env.production?
Rails.application.config.action_mailer.delivery_method = :smtp
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
address: "email.server.com",
port: 465,
user_name: "smtp",
password: "123456",
domain: "gitlab.company.com",
authentication: :login,
enable_starttls_auto: true,
openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
}
end

您可以在 https://gitlab.com/gitlab-org/gitlab-ce/blob/8-12-stable/config/initializers/smtp_settings.rb.sample#L13 上查看用于配置 SMTP 的示例文件文档?

您可以在此处查看更多配置选项 http://api.rubyonrails.org/classes/ActionMailer/Base.html#class-ActionMailer::Base-label-Configuration+options

关于email - Gitlab 设置不发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39613125/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com