Project

General

Profile

EmailConfiguration » History » Version 20

Etienne Massip, 2012-06-18 11:20
Removed the tls: true parameter in Google SMTP use example.

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