EmailConfiguration » History » Version 22
Jean-Baptiste Barth, 2012-10-02 13:38
| 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 | 22 | Jean-Baptiste Barth | *NB* : if you want to use asynchronous sends, be careful there's a regression in Redmine 2.x which implies a modification of the "smtp_settings" key in your @config/configuration.yml@. See #11376 for more informations. |
| 34 | 1 | Cyber Sprocket | |
| 35 | 11 | Etienne Massip | h2. Example configuration.yml Configurations |
| 36 | 1 | Cyber Sprocket | |
| 37 | h3. Simple Login Authentication (default settings) |
||
| 38 | |||
| 39 | <pre> |
||
| 40 | # Outgoing email settings |
||
| 41 | |||
| 42 | production: |
||
| 43 | 12 | Ross Wilson | email_delivery: |
| 44 | delivery_method: :smtp |
||
| 45 | smtp_settings: |
||
| 46 | address: smtp.example.net |
||
| 47 | port: 25 |
||
| 48 | domain: example.net |
||
| 49 | authentication: :login |
||
| 50 | user_name: redmine@example.net |
||
| 51 | password: redmine |
||
| 52 | 1 | Cyber Sprocket | |
| 53 | development: |
||
| 54 | 12 | Ross Wilson | email_delivery: |
| 55 | delivery_method: :smtp |
||
| 56 | smtp_settings: |
||
| 57 | address: 127.0.0.1 |
||
| 58 | port: 25 |
||
| 59 | domain: example.net |
||
| 60 | authentication: :login |
||
| 61 | user_name: redmine@example.net |
||
| 62 | password: redmine |
||
| 63 | 1 | Cyber Sprocket | </pre> |
| 64 | |||
| 65 | |||
| 66 | *If you want to use GMail/Google Apps and other TLS-requiring SMTP servers*, you'll have to add some TLS-related settings : |
||
| 67 | 8 | Joël Lamotte | |
| 68 | <pre> |
||
| 69 | production: |
||
| 70 | 12 | Ross Wilson | email_delivery: |
| 71 | delivery_method: :smtp |
||
| 72 | smtp_settings: |
||
| 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 | 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 | 13 | Ross Wilson | email_delivery: |
| 93 | delivery_method: :smtp |
||
| 94 | smtp_settings: |
||
| 95 | address: smtp.knology.net |
||
| 96 | port: 25 |
||
| 97 | domain: cybersprocket.com |
||
| 98 | authentication: :none |
||
| 99 | 1 | Cyber Sprocket | </pre> |
| 100 | |||
| 101 | h3. Using sendmail command |
||
| 102 | 5 | Eric Davis | |
| 103 | Example for a unix system that uses the @/usr/sbin/sendmail@ command. |
||
| 104 | |||
| 105 | <pre> |
||
| 106 | production: |
||
| 107 | 13 | Ross Wilson | email_delivery: |
| 108 | delivery_method: :sendmail |
||
| 109 | 5 | Eric Davis | </pre> |
| 110 | 1 | Cyber Sprocket | |
| 111 | 7 | Mischa The Evil | h2. More information |
| 112 | 5 | Eric Davis | |
| 113 | * "Action Mailer Configuration":http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration |