@@ -0,0 +1,21 | |||
|
1 | # Outgoing email settings | |
|
2 | ||
|
3 | production: | |
|
4 | delivery_method: :smtp | |
|
5 | smtp_settings: | |
|
6 | address: smtp.somenet.foo | |
|
7 | port: 25 | |
|
8 | domain: somenet.foo | |
|
9 | authentication: :login | |
|
10 | user_name: redmine@somenet.foo | |
|
11 | password: redmine | |
|
12 | ||
|
13 | development: | |
|
14 | delivery_method: :smtp | |
|
15 | smtp_settings: | |
|
16 | address: 127.0.0.1 | |
|
17 | port: 25 | |
|
18 | domain: somenet.foo | |
|
19 | authentication: :login | |
|
20 | user_name: redmine@somenet.foo | |
|
21 | password: redmine |
@@ -0,0 +1,17 | |||
|
1 | # Loads action_mailer settings from email.yml | |
|
2 | # and turns deliveries on if configuration file is found | |
|
3 | ||
|
4 | filename = File.join(File.dirname(__FILE__), '..', 'email.yml') | |
|
5 | if File.file?(filename) | |
|
6 | mailconfig = YAML::load_file(filename) | |
|
7 | ||
|
8 | if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env) | |
|
9 | # Enable deliveries | |
|
10 | ActionMailer::Base.perform_deliveries = true | |
|
11 | ||
|
12 | mailconfig[Rails.env].each do |k, v| | |
|
13 | v.symbolize_keys! if v.respond_to?(:symbolize_keys!) | |
|
14 | ActionMailer::Base.send("#{k}=", v) | |
|
15 | end | |
|
16 | end | |
|
17 | end |
@@ -39,6 +39,7 class SettingsController < ApplicationController | |||
|
39 | 39 | end |
|
40 | 40 | @options = {} |
|
41 | 41 | @options[:user_format] = User::USER_FORMATS.keys.collect {|f| [User.current.name(f), f.to_s] } |
|
42 | @deliveries = ActionMailer::Base.perform_deliveries | |
|
42 | 43 | end |
|
43 | 44 | |
|
44 | 45 | def plugin |
@@ -1,3 +1,4 | |||
|
1 | <% if @deliveries %> | |
|
1 | 2 | <% form_tag({:action => 'edit', :tab => 'notifications'}) do %> |
|
2 | 3 | |
|
3 | 4 | <div class="box tabular settings"> |
@@ -28,3 +29,8 | |||
|
28 | 29 | |
|
29 | 30 | <%= submit_tag l(:button_save) %> |
|
30 | 31 | <% end %> |
|
32 | <% else %> | |
|
33 | <div class="nodata"> | |
|
34 | <%= simple_format(l(:text_email_delivery_not_configured)) %> | |
|
35 | </div> | |
|
36 | <% end %> |
@@ -49,25 +49,9 Rails::Initializer.run do |config| | |||
|
49 | 49 | # Use Active Record's schema dumper instead of SQL when creating the test database |
|
50 | 50 | # (enables use of different database adapters for development and test environments) |
|
51 | 51 | # config.active_record.schema_format = :ruby |
|
52 | ||
|
53 | # See Rails::Configuration for more options | |
|
54 | 52 | |
|
55 | # SMTP server configuration | |
|
56 | config.action_mailer.smtp_settings = { | |
|
57 | :address => "127.0.0.1", | |
|
58 | :port => 25, | |
|
59 | :domain => "somenet.foo", | |
|
60 | :authentication => :login, | |
|
61 | :user_name => "redmine@somenet.foo", | |
|
62 | :password => "redmine", | |
|
63 | } | |
|
64 | ||
|
65 | config.action_mailer.perform_deliveries = true | |
|
66 | ||
|
67 | # Tell ActionMailer not to deliver emails to the real world. | |
|
68 | # The :test delivery method accumulates sent emails in the | |
|
69 | # ActionMailer::Base.deliveries array. | |
|
70 | #config.action_mailer.delivery_method = :test | |
|
71 | config.action_mailer.delivery_method = :smtp | |
|
72 | ||
|
53 | # Deliveries are disabled by default. Do NOT modify this section. | |
|
54 | # Define your email configuration in email.yml instead. | |
|
55 | # It will automatically turn deliveries on | |
|
56 | config.action_mailer.perform_deliveries = false | |
|
73 | 57 | end |
@@ -13,4 +13,5 config.whiny_nils = true | |||
|
13 | 13 | config.action_controller.consider_all_requests_local = true |
|
14 | 14 | config.action_controller.perform_caching = false |
|
15 | 15 | |
|
16 | config.action_mailer.perform_deliveries = true | |
|
16 | 17 | config.action_mailer.delivery_method = :test |
@@ -13,4 +13,5 config.whiny_nils = true | |||
|
13 | 13 | config.action_controller.consider_all_requests_local = true |
|
14 | 14 | config.action_controller.perform_caching = false |
|
15 | 15 | |
|
16 |
config.action_mailer.deliver |
|
|
16 | config.action_mailer.perform_deliveries = true | |
|
17 | config.action_mailer.delivery_method = :test |
@@ -13,4 +13,5 config.whiny_nils = true | |||
|
13 | 13 | config.action_controller.consider_all_requests_local = true |
|
14 | 14 | config.action_controller.perform_caching = false |
|
15 | 15 | |
|
16 |
config.action_mailer.deliver |
|
|
16 | config.action_mailer.perform_deliveries = true | |
|
17 | config.action_mailer.delivery_method = :test |
@@ -53,10 +53,10 Optional: | |||
|
53 | 53 | trackers, statuses, workflow) and adjust application settings |
|
54 | 54 | |
|
55 | 55 | |
|
56 |
== |
|
|
57 | ||
|
58 | In config/environment.rb, you can set parameters for your SMTP server: | |
|
59 | config.action_mailer.smtp_settings: SMTP server configuration | |
|
60 | config.action_mailer.perform_deliveries: set to false to disable mail delivering | |
|
56 | == Email delivery Configuration | |
|
61 | 57 | |
|
58 | Copy config/email.yml.example to config/email.yml and edit this file | |
|
59 | to adjust your SMTP settings. | |
|
62 | 60 | Don't forget to restart the application after any change to this file. |
|
61 | ||
|
62 | Please do not enter your SMTP settings in environment.rb. |
@@ -10,15 +10,13 http://www.redmine.org/ | |||
|
10 | 10 | 1. Uncompress the program archive in a new directory |
|
11 | 11 | |
|
12 | 12 | 3. Copy your database settings (RAILS_ROOT/config/database.yml) |
|
13 | and SMTP settings (RAILS_ROOT/config/email.yml) | |
|
13 | 14 | into the new config directory |
|
14 | 15 | |
|
15 | 4. Enter your SMTP settings in config/environment.rb | |
|
16 | Do not replace this file with the old one | |
|
17 | ||
|
18 | 5. Migrate your database (please make a backup before doing this): | |
|
16 | 4. Migrate your database (please make a backup before doing this): | |
|
19 | 17 | rake db:migrate RAILS_ENV="production" |
|
20 | 18 | |
|
21 |
|
|
|
19 | 5. Copy the RAILS_ROOT/files directory content into your new installation | |
|
22 | 20 | This directory contains all the attached files |
|
23 | 21 | |
|
24 | 22 |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -636,3 +636,4 label_incoming_emails: Incoming emails | |||
|
636 | 636 | label_generate_key: Generate a key |
|
637 | 637 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
638 | 638 | setting_mail_handler_api_key: API key |
|
639 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -633,3 +633,4 label_incoming_emails: Incoming emails | |||
|
633 | 633 | label_generate_key: Generate a key |
|
634 | 634 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
635 | 635 | setting_mail_handler_api_key: API key |
|
636 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Incoming emails | |||
|
632 | 632 | label_generate_key: Generate a key |
|
633 | 633 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
634 | 634 | setting_mail_handler_api_key: API key |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -606,6 +606,7 text_reassign_time_entries: 'Reassign reported hours to this issue:' | |||
|
606 | 606 | text_user_wrote: '%s wrote:' |
|
607 | 607 | text_enumeration_destroy_question: '%d objects are assigned to this value.' |
|
608 | 608 | text_enumeration_category_reassign_to: 'Reassign them to this value:' |
|
609 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." | |
|
609 | 610 | |
|
610 | 611 | default_role_manager: Manager |
|
611 | 612 | default_role_developper: Developer |
@@ -634,3 +634,4 label_incoming_emails: Incoming emails | |||
|
634 | 634 | label_generate_key: Generate a key |
|
635 | 635 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
636 | 636 | setting_mail_handler_api_key: API key |
|
637 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -606,6 +606,7 text_reassign_time_entries: 'Reporter les heures sur cette demande:' | |||
|
606 | 606 | text_user_wrote: '%s a écrit:' |
|
607 | 607 | text_enumeration_destroy_question: 'Cette valeur est affectée à %d objets.' |
|
608 | 608 | text_enumeration_category_reassign_to: 'Réaffecter les objets à cette valeur:' |
|
609 | text_email_delivery_not_configured: "L'envoi de mail n'est pas configuré, les notifications sont désactivées.\nConfigurez votre serveur SMTP dans config/email.yml et redémarrez l'application pour les activer." | |
|
609 | 610 | |
|
610 | 611 | default_role_manager: Manager |
|
611 | 612 | default_role_developper: Développeur |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Beérkezett levelek | |||
|
632 | 632 | label_generate_key: Kulcs generálása |
|
633 | 633 | setting_mail_handler_api_enabled: Web Service engedélyezése a beérkezett levelekhez |
|
634 | 634 | setting_mail_handler_api_key: API kulcs |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Incoming emails | |||
|
632 | 632 | label_generate_key: Generate a key |
|
633 | 633 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
634 | 634 | setting_mail_handler_api_key: API key |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -634,3 +634,4 label_generate_key: Generuoti raktą | |||
|
634 | 634 | setting_mail_handler_api_enabled: Įgalinti WS įeinantiems laiškams |
|
635 | 635 | setting_mail_handler_api_key: API raktas |
|
636 | 636 | |
|
637 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Incoming emails | |||
|
632 | 632 | label_generate_key: Generate a key |
|
633 | 633 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
634 | 634 | setting_mail_handler_api_key: API key |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Incoming emails | |||
|
632 | 632 | label_generate_key: Generate a key |
|
633 | 633 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
634 | 634 | setting_mail_handler_api_key: API key |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -631,3 +631,4 label_incoming_emails: Incoming emails | |||
|
631 | 631 | label_generate_key: Generate a key |
|
632 | 632 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
633 | 633 | setting_mail_handler_api_key: API key |
|
634 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -635,3 +635,4 label_incoming_emails: Incoming emails | |||
|
635 | 635 | label_generate_key: Generate a key |
|
636 | 636 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
637 | 637 | setting_mail_handler_api_key: API key |
|
638 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Incoming emails | |||
|
632 | 632 | label_generate_key: Generate a key |
|
633 | 633 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
634 | 634 | setting_mail_handler_api_key: API key |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 label_incoming_emails: Incoming emails | |||
|
632 | 632 | label_generate_key: Generate a key |
|
633 | 633 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
634 | 634 | setting_mail_handler_api_key: API key |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -634,3 +634,4 label_incoming_emails: Incoming emails | |||
|
634 | 634 | label_generate_key: Generate a key |
|
635 | 635 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
636 | 636 | setting_mail_handler_api_key: API key |
|
637 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -633,3 +633,4 label_incoming_emails: Incoming emails | |||
|
633 | 633 | label_generate_key: Generate a key |
|
634 | 634 | setting_mail_handler_api_enabled: Enable WS for incoming emails |
|
635 | 635 | setting_mail_handler_api_key: API key |
|
636 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 default_activity_development: 開發 | |||
|
632 | 632 | enumeration_issue_priorities: 項目優先權 |
|
633 | 633 | enumeration_doc_categories: 文件分類 |
|
634 | 634 | enumeration_activities: 活動 (時間追蹤) |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
@@ -632,3 +632,4 default_activity_development: 开发 | |||
|
632 | 632 | enumeration_issue_priorities: 问题优先级 |
|
633 | 633 | enumeration_doc_categories: 文档类别 |
|
634 | 634 | enumeration_activities: 活动(时间跟踪) |
|
635 | text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." |
General Comments 0
You need to be logged in to leave comments.
Login now