Project

General

Profile

EmailConfiguration » History » Version 33

Miodrag Milic, 2013-01-10 14:59

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