Feature #1412
SMTP server config should be moved from environment.rb
| Status: | Closed | Start: | 2008-06-09 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Emails | |||
| Target version: | 0.8 | |||
| Resolution: | Fixed |
Description
Items that will be customised regularly on a per-installation basis should not be in version-controlled code. This makes upgrading harder or even working with an svn checkout of a branch (e.g. the 0.7-stable branch).
In the first case, moving to a new installation will break loose the SMTP settings as you'll get a new environment.rb and in the second, you'll always see local modifications etc.
The config settings for SMTP server should either be in the database (configured through the e-mail administration page) or in a separate config file that isn't versioned (similar to databases.yml).
Associated revisions
Email delivery configuration moved to an unversioned YAML file (config/email.yml, see the sample file) (#1412).
Email delivery is disabled. It's automatically turned on when configuration is found.
History
2008-07-02 23:03 - Jean-Philippe Lang
I propose to move the mail settings to a file similar to database.yml (eg. email.yml), with a section for each environment (production, development ...).
It would like this:
production:
delivery_method: :smtp
smtp_settings:
address: smtp.somenet.foo
port: 25
domain: somenet.foo
authentication: :login
user_name: redmine@somenet.foo
password: redmine
perform_deliveries: true
development:
[...]
What do you think ?
2008-07-03 00:37 - Eric Davis
Jean-Philippe Lang wrote:
I propose to move the mail settings to a file similar to database.yml (eg. email.yml), with a section for each environment (production, development ...).
What do you think ?
That should work good. I've seen several projects use a format like that.
2008-07-03 10:48 - Russell Hind
Jean-Philippe Lang wrote:
I propose to move the mail settings to a file similar to database.yml (eg. email.yml), with a section for each environment (production, development ...).
Hi Jean-Philippe, yes that would be fine.
Thanks
Russell
2008-07-04 22:52 - Jean-Philippe Lang
- Status changed from New to Closed
- Target version set to 0.8
- Resolution set to Fixed
Committed in r1625.
SMTP settings should now be entered in config/email.yml (see the sample email.yml.example).
2008-07-28 10:38 - Roger Hunwicks
It took me a while to figure out how to get Redmine to send emails using an internal SMTP server that doesn't require authentication - Google turned up some settings for ActionMailer that didn't work - so I thought I would document it here in case it is useful for anyone else.
If you are getting "authentication not enabled" when you try and send a test email, you need to configure your email.yml like:
production:
delivery_method: :smtp
smtp_settings:
address: mailserver.domain.tld
port: 25
domain: thisserver.domain.tld
I.e. remove the lines relating to authentication, user_name and password.
2008-07-28 11:20 - Russell Hind
Roger Hunwicks wrote:
It took me a while to figure out how to get Redmine to send emails using an internal SMTP server that doesn't require authentication - Google turned up some settings for ActionMailer that didn't work - so I thought I would document it here in case it is useful for anyone else.
If you are getting "authentication not enabled" when you try and send a test email, you need to configure your email.yml like: [...]
I.e. remove the lines relating to authentication, user_name and password.
Took me a while to find this too. For non-ruby users, things like this do need documenting somewhere.
Cheers
Russell