ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

« Previous - Version 3/4 (diff) - Next » - Current version
Holger Just, 2012-07-04 08:21 pm


Email Delivery

Contents

This document describes the email delivery configuration of ChiliProject. All configuration examples have to go into config/configuration.yml in your ChiliProject directory.

For an overview of other configuration options in that file please refer to Configuration File.

Common configurations

Sendmail command

production:
  email_delivery:
    delivery_method: :sendmail

Simple SMTP server at localhost

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "localhost" 
      port: 25

SMTP server at example.com using LOGIN authentication and checking HELO for foo.com

This configuration is just an extension of the above. Note that we set the string sent with HELO with the domain attribute. Typically this should be your externally visible hostname. Some mail servers check this field and deny sending if it does not match your hostname.

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "example.com" 
      port: 25
      authentication: :login
      domain: 'foo.com'
      user_name: 'myaccount'
      password: 'password'

SMTP server at example.com using PLAIN authentication

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "example.com" 
      port: 25
      authentication: :plain
      domain: 'example.com'
      user_name: 'myaccount'
      password: 'password'

SMTP server using TLS (GMail)

GMail and a few other mail service providers expect the client to deliver emails using TLS. TLS is a version of SSL which is required by GMail in order to send email. ChiliProject's email library ActionMailer includes the capabilities for that by default, but only if you use Ruby >= 1.8.7.

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com" 
      port: 587
      authentication: :plain
      user_name: "your_email@gmail.com" 
      password: "your_password" 

If you are still using Ruby 1.8.6 you need to install an additional plugin. The action_mailer_optional_tls_plugin adds a TLS option to ChiliProject's emailing library.

To install this plugin, use the script/plugin command in your ChiliProject directory:

ruby script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git

You can then configure ChiliProject to send e-mail via TLS:

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: true
      address: "smtp.gmail.com" 
      port: 587
      authentication: :plain
      user_name: "your_email@gmail.com" 
      password: "your_password" 

Optimizations

By default, ChiliProject send email synchronously. That means interactive actions (like closing an issue) take as long as the SMTP server needs to fully receive and acknowledge all e-mails generated by that action.

If you are on a slow network or use a slow smtp gateway you can speed things up by sending mails asynchronously. The downside of that approach is that ChiliProject can't notice any delivery errors anymore. So you need to make sure to properly configure your SMTP server so that it doesn't reject mails.

To enable the asynchronous mode, just replace the delivery_method: :smtp with delivery_method: :async_smtp in your configuration.

More configuration options

See the "Configuration options" at the following website for a list of the
full options allowed:

http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer

Testing the setup

Make sure that you Restart ChiliProject and start in the same mode as you configured above (e.g. production). To send a test email:

  1. Login as an administrator
  2. Make sure, that "I don't want to be notified of changes that I make myself" option is not checked in admin's profile
  3. Go to the Administration panel
  4. Go into the Settings and select the "Email notifications" tab
  5. In the bottom right, click the link to "Send a test email"