Feature #1412
SMTP server config should be moved from environment.rb
Status: | Closed | Start date: | 2008-06-09 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Email notifications | |||
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
#1
Updated by Jean-Philippe Lang almost 14 years ago
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 ?
#2
Updated by Eric Davis almost 14 years ago
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.
#3 Updated by Anonymous almost 14 years ago
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
#4
Updated by Jean-Philippe Lang almost 14 years ago
- 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).
#5
Updated by Roger Hunwicks almost 14 years ago
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.
#6 Updated by Anonymous almost 14 years ago
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
#7
Updated by Ryan Macaluso over 13 years ago
I gave up on using gmail as SMTP server and used this method to use the IIS SMTP server. I also had to give access in IIS for my computer (acting as the server) to relay email and then notifications worked.
I am so glad I found this solution!!!
Thanks,
Ryan