Project

General

Profile

EmailConfiguration » History » Version 30

Miodrag Milic, 2012-12-25 18:43

1 1 Cyber Sprocket
h1. Email Configuration
2
3 7 Mischa The Evil
{{>toc}}
4
5 1 Cyber Sprocket
h2. Configuration Directives
6
7 10 Graham King
This page is a work in progress, the following configuration directives are only a partial list.
8 1 Cyber Sprocket
9
h3. authentication
10
11
The type of authentication method expected by your service provider. 
12
13
Valid settings:
14
* :login
15
* :none
16
17 4 Anthony Cartmell
(note: if you set this to @:none@, you must not include the @user_name@ and @password@ settings)
18
19 1 Cyber Sprocket
h3. delivery_method
20
21 6 Eric Davis
The mail transport method to be used.
22 1 Cyber Sprocket
23
Valid settings:
24
* :smtp
25 16 Mischa The Evil
* :async_smtp
26 1 Cyber Sprocket
* :sendmail
27 16 Mischa The Evil
* :async_sendmail
28 1 Cyber Sprocket
29 6 Eric Davis
h4. Asynchronous delivery_methods
30
31 30 Miodrag Milic
The @:async_smtp@ and @:async_sendmail@ use asynchronous sends, which means Redmine does not wait for the email to be sent to display the next page.  See "Asynchronous Email Delivery":http://redmineblog.com/articles/asynchronous-email-delivery/ for more details. Some SMTP servers have delay period before processing takes place as anti-spam feature, during which time synchronous method will block Redmine ("10 seconds":http://answers.bitnami.org/questions/4421/updating-an-issue-in-redmine-takes-10-seconds could be default value, see also #11376 for more information) .
32 1 Cyber Sprocket
33 23 Miodrag Milic
With this delivery method, smtp configuration is specified using @async_smtp_settings@ keyword:
34
35
<pre>
36
development:
37
  email_delivery:
38
    delivery_method: :async_smtp
39
    async_smtp_settings:
40
    ...
41
</pre>
42
43 11 Etienne Massip
h2. Example configuration.yml Configurations
44 1 Cyber Sprocket
45
h3. Simple Login Authentication (default settings)
46
47
<pre>
48
# Outgoing email settings
49
50
production:
51 12 Ross Wilson
  email_delivery:
52
    delivery_method: :smtp
53
    smtp_settings:
54
      address: smtp.example.net
55
      port: 25
56
      domain: example.net
57
      authentication: :login
58
      user_name: redmine@example.net
59
      password: redmine
60 1 Cyber Sprocket
  
61
development:
62 12 Ross Wilson
  email_delivery:
63
    delivery_method: :smtp
64
    smtp_settings:
65
      address: 127.0.0.1
66
      port: 25
67
      domain: example.net
68
      authentication: :login
69
      user_name: redmine@example.net
70
      password: redmine
71 1 Cyber Sprocket
</pre>
72
73
74
*If you want to use GMail/Google Apps and other TLS-requiring SMTP servers*, you'll have to add some TLS-related settings :
75 8 Joël Lamotte
76
<pre>
77
production:
78 12 Ross Wilson
  email_delivery:
79
    delivery_method: :smtp
80
    smtp_settings:
81
      enable_starttls_auto: true
82
      address: "smtp.gmail.com" 
83
      port: '587'
84
      domain: "smtp.gmail.com" 
85
      authentication: :plain
86
      user_name: "your_email@gmail.com" 
87
      password: "your_password" 
88 8 Joël Lamotte
89
</pre>
90
91
However, this will only work with "recent" enough ruby and rails versions (1.8.7 patchset 2xx and 2.3.5).
92
(See #5814 )
93
94 1 Cyber Sprocket
h3. No Authentication
95
96
Example for an SMTP service provider with no authentication.  Note the colon before none.
97
98
<pre>
99
production:
100 13 Ross Wilson
  email_delivery:
101
    delivery_method: :smtp
102
    smtp_settings:
103
      address: smtp.knology.net
104
      port: 25
105
      domain: cybersprocket.com
106
      authentication: :none
107 1 Cyber Sprocket
</pre>
108
109
h3. Using sendmail command
110 5 Eric Davis
111
Example for a unix system that uses the @/usr/sbin/sendmail@ command.
112
113
<pre>
114
production:
115 13 Ross Wilson
  email_delivery:
116
    delivery_method: :sendmail
117 5 Eric Davis
</pre>
118 1 Cyber Sprocket
119 7 Mischa The Evil
h2. More information
120 5 Eric Davis
121
* "Action Mailer Configuration":http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration