Project

General

Profile

EmailConfiguration » History » Version 23

Miodrag Milic, 2012-12-25 07:21

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 10 Graham King
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.
32 18 Etienne Massip
33 22 Jean-Baptiste Barth
*NB* : if you want to use asynchronous sends, be careful there's a regression in Redmine 2.x which implies a modification of the "smtp_settings" key in your @config/configuration.yml@. See #11376 for more informations.
34 1 Cyber Sprocket
35 23 Miodrag Milic
With this delivery method, smtp configuration is specified using @async_smtp_settings@ keyword:
36
37
<pre>
38
development:
39
  email_delivery:
40
    delivery_method: :async_smtp
41
    async_smtp_settings:
42
    ...
43
</pre>
44
45 11 Etienne Massip
h2. Example configuration.yml Configurations
46 1 Cyber Sprocket
47
h3. Simple Login Authentication (default settings)
48
49
<pre>
50
# Outgoing email settings
51
52
production:
53 12 Ross Wilson
  email_delivery:
54
    delivery_method: :smtp
55
    smtp_settings:
56
      address: smtp.example.net
57
      port: 25
58
      domain: example.net
59
      authentication: :login
60
      user_name: redmine@example.net
61
      password: redmine
62 1 Cyber Sprocket
  
63
development:
64 12 Ross Wilson
  email_delivery:
65
    delivery_method: :smtp
66
    smtp_settings:
67
      address: 127.0.0.1
68
      port: 25
69
      domain: example.net
70
      authentication: :login
71
      user_name: redmine@example.net
72
      password: redmine
73 1 Cyber Sprocket
</pre>
74
75
76
*If you want to use GMail/Google Apps and other TLS-requiring SMTP servers*, you'll have to add some TLS-related settings :
77 8 Joël Lamotte
78
<pre>
79
production:
80 12 Ross Wilson
  email_delivery:
81
    delivery_method: :smtp
82
    smtp_settings:
83
      enable_starttls_auto: true
84
      address: "smtp.gmail.com" 
85
      port: '587'
86
      domain: "smtp.gmail.com" 
87
      authentication: :plain
88
      user_name: "your_email@gmail.com" 
89
      password: "your_password" 
90 8 Joël Lamotte
91
</pre>
92
93
However, this will only work with "recent" enough ruby and rails versions (1.8.7 patchset 2xx and 2.3.5).
94
(See #5814 )
95
96 1 Cyber Sprocket
h3. No Authentication
97
98
Example for an SMTP service provider with no authentication.  Note the colon before none.
99
100
<pre>
101
production:
102 13 Ross Wilson
  email_delivery:
103
    delivery_method: :smtp
104
    smtp_settings:
105
      address: smtp.knology.net
106
      port: 25
107
      domain: cybersprocket.com
108
      authentication: :none
109 1 Cyber Sprocket
</pre>
110
111
h3. Using sendmail command
112 5 Eric Davis
113
Example for a unix system that uses the @/usr/sbin/sendmail@ command.
114
115
<pre>
116
production:
117 13 Ross Wilson
  email_delivery:
118
    delivery_method: :sendmail
119 5 Eric Davis
</pre>
120 1 Cyber Sprocket
121 7 Mischa The Evil
h2. More information
122 5 Eric Davis
123
* "Action Mailer Configuration":http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration