end
@options = {}
@options[:user_format] = User::USER_FORMATS.keys.collect {|f| [User.current.name(f), f.to_s] }
+ @deliveries = ActionMailer::Base.perform_deliveries
end
def plugin
+<% if @deliveries %>
<% form_tag({:action => 'edit', :tab => 'notifications'}) do %>
<div class="box tabular settings">
<%= submit_tag l(:button_save) %>
<% end %>
+<% else %>
+<div class="nodata">
+<%= simple_format(l(:text_email_delivery_not_configured)) %>
+</div>
+<% end %>
--- /dev/null
+# Outgoing email settings
+
+production:
+ delivery_method: :smtp
+ smtp_settings:
+ address: smtp.somenet.foo
+ port: 25
+ domain: somenet.foo
+ authentication: :login
+ user_name: redmine@somenet.foo
+ password: redmine
+
+development:
+ delivery_method: :smtp
+ smtp_settings:
+ address: 127.0.0.1
+ port: 25
+ domain: somenet.foo
+ authentication: :login
+ user_name: redmine@somenet.foo
+ password: redmine
# Use Active Record's schema dumper instead of SQL when creating the test database
# (enables use of different database adapters for development and test environments)
# config.active_record.schema_format = :ruby
-
- # See Rails::Configuration for more options
- # SMTP server configuration
- config.action_mailer.smtp_settings = {
- :address => "127.0.0.1",
- :port => 25,
- :domain => "somenet.foo",
- :authentication => :login,
- :user_name => "redmine@somenet.foo",
- :password => "redmine",
- }
-
- config.action_mailer.perform_deliveries = true
-
- # Tell ActionMailer not to deliver emails to the real world.
- # The :test delivery method accumulates sent emails in the
- # ActionMailer::Base.deliveries array.
- #config.action_mailer.delivery_method = :test
- config.action_mailer.delivery_method = :smtp
-
+ # Deliveries are disabled by default. Do NOT modify this section.
+ # Define your email configuration in email.yml instead.
+ # It will automatically turn deliveries on
+ config.action_mailer.perform_deliveries = false
end
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
+config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :test
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
-config.action_mailer.delivery_method = :test
\ No newline at end of file
+config.action_mailer.perform_deliveries = true
+config.action_mailer.delivery_method = :test
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
-config.action_mailer.delivery_method = :test
\ No newline at end of file
+config.action_mailer.perform_deliveries = true
+config.action_mailer.delivery_method = :test
--- /dev/null
+# Loads action_mailer settings from email.yml
+# and turns deliveries on if configuration file is found
+
+filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
+if File.file?(filename)
+ mailconfig = YAML::load_file(filename)
+
+ if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env)
+ # Enable deliveries
+ ActionMailer::Base.perform_deliveries = true
+
+ mailconfig[Rails.env].each do |k, v|
+ v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
+ ActionMailer::Base.send("#{k}=", v)
+ end
+ end
+end
trackers, statuses, workflow) and adjust application settings
-== SMTP server Configuration
-
-In config/environment.rb, you can set parameters for your SMTP server:
-config.action_mailer.smtp_settings: SMTP server configuration
-config.action_mailer.perform_deliveries: set to false to disable mail delivering
+== Email delivery Configuration
+Copy config/email.yml.example to config/email.yml and edit this file
+to adjust your SMTP settings.
Don't forget to restart the application after any change to this file.
+
+Please do not enter your SMTP settings in environment.rb.
1. Uncompress the program archive in a new directory
3. Copy your database settings (RAILS_ROOT/config/database.yml)
+ and SMTP settings (RAILS_ROOT/config/email.yml)
into the new config directory
-4. Enter your SMTP settings in config/environment.rb
- Do not replace this file with the old one
-
-5. Migrate your database (please make a backup before doing this):
+4. Migrate your database (please make a backup before doing this):
rake db:migrate RAILS_ENV="production"
-6. Copy the RAILS_ROOT/files directory content into your new installation
+5. Copy the RAILS_ROOT/files directory content into your new installation
This directory contains all the attached files
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
text_user_wrote: '%s wrote:'
text_enumeration_destroy_question: '%d objects are assigned to this value.'
text_enumeration_category_reassign_to: 'Reassign them to this value:'
+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."
default_role_manager: Manager
default_role_developper: Developer
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
text_user_wrote: '%s a écrit:'
text_enumeration_destroy_question: 'Cette valeur est affectée à %d objets.'
text_enumeration_category_reassign_to: 'Réaffecter les objets à cette valeur:'
+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."
default_role_manager: Manager
default_role_developper: Développeur
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Kulcs generálása
setting_mail_handler_api_enabled: Web Service engedélyezése a beérkezett levelekhez
setting_mail_handler_api_key: API kulcs
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
setting_mail_handler_api_enabled: Įgalinti WS įeinantiems laiškams
setting_mail_handler_api_key: API raktas
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key\r
setting_mail_handler_api_enabled: Enable WS for incoming emails\r
setting_mail_handler_api_key: API key\r
+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."\r
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
label_generate_key: Generate a key
setting_mail_handler_api_enabled: Enable WS for incoming emails
setting_mail_handler_api_key: API key
+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."
enumeration_issue_priorities: 項目優先權
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
+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."
enumeration_issue_priorities: 问题优先级
enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪)
+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."