EmailConfiguration » History » Version 14
Mischa The Evil, 2011-11-28 05:49
Added note about #5058 with :async delivery_methods.
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 | 9 | Glenn Gould | * :async_smtp - valid in trunk/0.9+ only |
26 | 1 | Cyber Sprocket | * :sendmail |
27 | 9 | Glenn Gould | * :async_sendmail - valid in trunk/0.9+ only |
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 | 14 | Mischa The Evil | This currently breaks the [[RedmineReminderEmails|reminder email]] feature, see #5058. |
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 | tls: true |
||
73 | enable_starttls_auto: true |
||
74 | address: "smtp.gmail.com" |
||
75 | port: '587' |
||
76 | domain: "smtp.gmail.com" |
||
77 | authentication: :plain |
||
78 | user_name: "your_email@gmail.com" |
||
79 | password: "your_password" |
||
80 | 8 | Joël Lamotte | |
81 | </pre> |
||
82 | |||
83 | However, this will only work with "recent" enough ruby and rails versions (1.8.7 patchset 2xx and 2.3.5). |
||
84 | (See #5814 ) |
||
85 | |||
86 | |||
87 | 1 | Cyber Sprocket | h3. No Authentication |
88 | |||
89 | Example for an SMTP service provider with no authentication. Note the colon before none. |
||
90 | |||
91 | <pre> |
||
92 | production: |
||
93 | 13 | Ross Wilson | email_delivery: |
94 | delivery_method: :smtp |
||
95 | smtp_settings: |
||
96 | address: smtp.knology.net |
||
97 | port: 25 |
||
98 | domain: cybersprocket.com |
||
99 | authentication: :none |
||
100 | 1 | Cyber Sprocket | </pre> |
101 | |||
102 | h3. Using sendmail command |
||
103 | 5 | Eric Davis | |
104 | Example for a unix system that uses the @/usr/sbin/sendmail@ command. |
||
105 | |||
106 | <pre> |
||
107 | production: |
||
108 | 13 | Ross Wilson | email_delivery: |
109 | delivery_method: :sendmail |
||
110 | 5 | Eric Davis | </pre> |
111 | 1 | Cyber Sprocket | |
112 | 7 | Mischa The Evil | h2. More information |
113 | 5 | Eric Davis | |
114 | * "Configuring Action Mailer":http://wiki.rubyonrails.org/howtos/mailers#configuring_action_mailer |
||
115 | * "Action Mailer Configuration":http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration |