原文链接:
http://blog.csdn.net/iefreer/article/details/8265209
Redmine的安装环境为CentOS5.5/nginx/passenger
配置为:
passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17;
passenger_ruby /usr/local/bin/ruby;
#rails server
server {
listen 80;
server_name projects.cnshangquan.org;
root /home/www/rorsite/redmine-2.1.2/public;
passenger_enabled on;
}
cd 到redmine路径下,
vi config/configuration.yml
其中邮件发送部分配置如下:
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.exmail.qq.com
port: 25
domain: exmail.qq.com
authentication: :login
user_name: "[email protected]"
password: "xxxx"
如果遇到500错误或者发送邮件超时, 请检查邮件帐号是否可用, 以及配置信息是否正确, 比如对于SSL, 端口不是25
如想查看邮件发送相关详细错误信息, 可以打开如下配置选项:
1. vi /config/environments/production.rb
2. Comment out the line config.action_mailer.logger = nil
3. Change this line config.action_mailer.raise_delivery_errors = true
另一种方法(有待验证):
http://blog.chinaunix.net/uid-12845622-id-3043643.html
Redmine增加自动发送邮件功能
Redmine作为协作分享的平台,邮件通知功能自然是必不可少的了。本文采用sendmail作为邮件传输代理,完成邮件自动发送的功能。
1、安装配置sendmail
sudo apt-get install sendmail
sudo sendmailconfig(一路选择Y)
2、修改Redmine邮件配置文件
cd /usr/share/redmine/config
cp email.yml.example email.yml
将email.yml修改成如下:
production:
delivery_method: :sendmail
sendmail_settings:
address: smtp.example.net
port: 25
domain: example.net
authentication: :login
user_name: "
[email protected]"
password: "redmine"
3、使能Redmine邮件发送功能
sudo vi /usr/share/redmine/config/environment.rb
将config.action_mailer.perform_deliveries = false 改为 config.action_mailer.perform_deliveries = true
4、重启apache2服务
sudo /etc/init.d/apache2 restart