Email configuration

Version 3 (Ohad Levy, 03/02/2010 12:49 pm)

1 1
h1. Email Configuration
2 1
3 2 Ohad Levy
an example settings file can be found at *config/email.yaml.example*, copy this file to *config/email.yaml*
4 1
5 2 Ohad Levy
h2. Configuration Directives
6 1
7 1
h3. authentication
8 1
9 1
The type of authentication method expected by your service provider.
10 1
11 1
Valid settings:
12 1
* :login
13 1
* :none
14 1
15 1
(note: if you set this to @:none@, you must not include the @user_name@ and @password@ settings)
16 1
17 1
h3. delivery_method
18 1
19 1
The mail transport method to be used.
20 1
21 1
Valid settings:
22 1
* :smtp
23 1
* :sendmail
24 1
25 1
h2. Example email.yml Configurations
26 1
27 1
h3. Simple Login Authentication (default settings)
28 1
29 1
<pre>
30 1
# Outgoing email settings
31 1
32 1
production:
33 3 Ohad Levy
  delivery_method: :smtp
34 3 Ohad Levy
  smtp_settings:
35 3 Ohad Levy
    address: smtp.example.net
36 3 Ohad Levy
    port: 25
37 3 Ohad Levy
    domain: example.net
38 3 Ohad Levy
    authentication: :login
39 3 Ohad Levy
    user_name: foreman@example.net
40 3 Ohad Levy
    password: foreman
41 1
</pre>
42 1
43 1
h3. No Authentication
44 1
45 1
Example for an SMTP service provider with no authentication. Note the colon before none.
46 1
47 1
<pre>
48 1
production:
49 3 Ohad Levy
  delivery_method: :smtp
50 3 Ohad Levy
  smtp_settings:
51 3 Ohad Levy
    address: smtp.nowhere.net
52 3 Ohad Levy
    port: 25
53 3 Ohad Levy
    domain: nowhere.com
54 3 Ohad Levy
    authentication: :none
55 1
</pre>
56 1
57 1
h3. Using sendmail command
58 1
59 1
Example for a unix system that uses the @/usr/sbin/sendmail@ command.
60 1
61 1
<pre>
62 1
production:
63 3 Ohad Levy
  delivery_method: :sendmail
64 1
</pre>
65 1
66 1
h3. More information
67 1
68 1
* "Configuring Action Mailer":http://wiki.rubyonrails.org/howtos/mailers#configuring_action_mailer
69 1
* "Action Mailer Configuration":http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration