Project

General

Profile

EmailConfiguration » History » Version 12

Ross Wilson, 2011-10-27 23:55

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