Project

General

Profile

EmailConfiguration » History » Version 31

Miodrag Milic, 2013-01-10 14:56

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