The installation environment of Redmine is CentOS5.5/nginx/passenger
configured as:
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 to the redmine path,
vi config/configuration.yml
The configuration of the mail sending part is as follows:
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"
If you encounter a 500 error or send emails timed out, please check whether the email account is available and the configuration information is correct. For example, for SSL, the port is not 25.
If you want to view the detailed error information about email sending, you can open the following configuration options:
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
Another way (to be verified): http://blog.chinaunix.net /uid-12845622-id-3043643.html
Redmine adds automatic email sending function
Redmine is a platform for collaborative sharing, and the email notification function is naturally essential. In this paper, sendmail is used as the mail transfer agent to complete the function of sending mail automatically.
1. Install and configure sendmail
sudo apt-get install sendmail
sudo sendmailconfig (choose Y all the way)
2. Modify the Redmine mail configuration file
cd /usr/share/redmine/config
cp email.yml.example email.yml Change
email.yml to the following :
production:
delivery_method: :sendmail
sendmail_settings:
address: smtp.example.net
port: 25
domain: example.net
authentication: :login
user_name: "[email protected]"
password: "redmine"
3. Enable Redmine email sending function
sudo vi / usr/share/redmine/config/environment.rb
Change config.action_mailer.perform_deliveries = false to config.action_mailer.perform_deliveries = true
4. Restart the apache2 service
sudo /etc/init.d/apache2 restart