我安装并运行了Redmine 2.2.1,但我无法通知电子邮件.我一直收到以下错误:
An error occurred while sending mail (getaddrinfo: Name or service not known)
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚我错过了什么.我按照这些说明使用Gmail设置了电子邮件通知,但似乎无论我对configuration.yml文件做了哪些更改,我仍然会收到相同的错误.
这是我的configuration.xml文件的样子:
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
address: "smtp.gmail.com"
port: 587
domain: "smtp.gmail.com"
authentication: :plain
user_name: "email@mydomain.com"
password: "mypassword"
Run Code Online (Sandbox Code Playgroud)
其他一切都被注释掉了.
我尝试更改和删除tls和enable_starttls_auto选项,但对configuration.yml文件的更改不会影响错误消息.
我还检查了我在其他论坛上发现的常见错误,例如配置文件中的选项卡或生产:配置被定义两次等.
我在Gmail帐户上启用了SMTP.
我也试过设置ActionMailer,但我不确定我应该用它做什么,或者我是否需要这样做.没有提到任何地方都需要它.我安装并设置但不确定是否正在做任何事情.
Redmine 2.2.1
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
Rails 3.2.11
gem version 1.8.24
Amazon AMI Linux
Run Code Online (Sandbox Code Playgroud)
production.log:
Started GET "/redmine/admin/test_email" for 98.xxx.xx.xx at Wed Jan 16 12:28:23 -0800 2013
Processing by AdminController#test_email …Run Code Online (Sandbox Code Playgroud)