2

我很难使在 GitLab 中发送的电子邮件正常工作(更改配置文件设置中的电子邮件)。我的服务器有exim4,我可以告诉它工作,因为如果我mail()在 PHP 中做简单的事情,它就会将电子邮件发送给收件人。现在,在 GitLab 中似乎并非如此。所以我修改了products.rb来设置 SMTP,并使用 Google SMTP:

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    address: "smtp.gmail.com",
    port: 465,
    user_name: "user@gmail.com",
    password: "hashpassword",
    domain: "gmail.com",
    authentication: :plain,
    enable_starttls_auto: true
  }

我什至尝试将端口更改为587467,但仍然无法正常工作。这是为什么?你能带我去我失踪的地方吗?

4

0 回答 0