Project

General

Profile

EmailConfiguration » History » Version 9

Glenn Gould, 2010-09-10 15:25
async_smtp and async_sendmail available in trunk and versions greater 0.9, therfor changed from 0.9 to 0.9+

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