Email notifications are now sent as Blind carbon copy by default. This can be changed in email notifications settings (new setting added).
Emission email address setting moved to the email notifications settings view. git-svn-id: http://redmine.rubyforge.org/svn/trunk@944 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
aebcfb1eda
commit
bc060b31ae
|
@ -48,8 +48,9 @@ class AdminController < ApplicationController
|
|||
def mail_options
|
||||
@notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted)
|
||||
if request.post?
|
||||
Setting.notified_events = (params[:notified_events] || [])
|
||||
Setting.emails_footer = params[:emails_footer] if params[:emails_footer]
|
||||
settings = (params[:settings] || {}).dup
|
||||
settings[:notified_events] ||= []
|
||||
settings.each { |name, value| Setting[name] = value }
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'admin', :action => 'mail_options'
|
||||
end
|
||||
|
|
|
@ -129,11 +129,20 @@ class Mailer < ActionMailer::Base
|
|||
default_url_options[:protocol] = Setting.protocol
|
||||
end
|
||||
|
||||
# Overrides the create_mail method to remove the current user from the recipients and cc
|
||||
# if he doesn't want to receive notifications about what he does
|
||||
# Overrides the create_mail method
|
||||
def create_mail
|
||||
recipients.delete(User.current.mail) if recipients && User.current.pref[:no_self_notified]
|
||||
cc.delete(User.current.mail) if cc && User.current.pref[:no_self_notified]
|
||||
# Removes the current user from the recipients and cc
|
||||
# if he doesn't want to receive notifications about what he does
|
||||
if User.current.pref[:no_self_notified]
|
||||
recipients.delete(User.current.mail) if recipients
|
||||
cc.delete(User.current.mail) if cc
|
||||
end
|
||||
# Blind carbon copy recipients
|
||||
if Setting.bcc_recipients?
|
||||
bcc([recipients, cc].flatten.compact.uniq)
|
||||
recipients []
|
||||
cc []
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -6,16 +6,25 @@
|
|||
|
||||
<% form_tag({:action => 'mail_options'}, :id => 'mail-options-form') do %>
|
||||
|
||||
<fieldset class="box tabular settings"><legend><%=l(:label_settings)%></legend>
|
||||
<p><label><%= l(:setting_mail_from) %></label>
|
||||
<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
|
||||
|
||||
<p><label><%= l(:setting_bcc_recipients) %></label>
|
||||
<%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
|
||||
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box"><legend><%=l(:text_select_mail_notifications)%></legend>
|
||||
<% @notifiables.each do |notifiable| %>
|
||||
<label><%= check_box_tag "notified_events[]", notifiable, Setting.notified_events.include?(notifiable) %>
|
||||
<label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %>
|
||||
<%= notifiable.humanize %></label><br />
|
||||
<% end %>
|
||||
<p><%= check_all_links('mail-options-form') %></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend>
|
||||
<%= text_area_tag 'emails_footer', Setting.emails_footer, :class => 'wiki-edit', :rows => 5 %>
|
||||
<%= text_area_tag 'settings[emails_footer]', Setting.emails_footer, :class => 'wiki-edit', :rows => 5 %>
|
||||
</fieldset>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<h2><%= l(:label_settings) %></h2>
|
||||
|
||||
<div id="settings">
|
||||
<% form_tag({:action => 'edit'}) do %>
|
||||
<div class="box tabular">
|
||||
<div class="box tabular settings">
|
||||
<p><label><%= l(:setting_app_title) %></label>
|
||||
<%= text_field_tag 'settings[app_title]', Setting.app_title, :size => 30 %></p>
|
||||
|
||||
|
@ -34,9 +33,6 @@
|
|||
<p><label><%= l(:setting_cross_project_issue_relations) %></label>
|
||||
<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p>
|
||||
|
||||
<p><label><%= l(:setting_mail_from) %></label>
|
||||
<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
|
||||
|
||||
<p><label><%= l(:setting_host_name) %></label>
|
||||
<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
|
||||
|
||||
|
@ -101,5 +97,4 @@
|
|||
</fieldset>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -39,6 +39,8 @@ issues_export_limit:
|
|||
default: 500
|
||||
mail_from:
|
||||
default: redmine@somenet.foo
|
||||
bcc_recipients:
|
||||
default: 1
|
||||
text_formatting:
|
||||
default: textile
|
||||
wiki_compression:
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: Manuelle Kontoaktivierung
|
|||
notice_account_pending: "Ihr Konto wurde erstellt und wartet jetzt auf die Genehmigung des Administrators."
|
||||
field_time_zone: Zeitzone
|
||||
text_caracters_minimum: Muss mindestens %d Zeichen lang sein.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -180,6 +180,7 @@ setting_self_registration: Self-registration
|
|||
setting_attachment_max_size: Attachment max. size
|
||||
setting_issues_export_limit: Issues export limit
|
||||
setting_mail_from: Emission email address
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
setting_host_name: Host name
|
||||
setting_text_formatting: Text formatting
|
||||
setting_wiki_compression: Wiki history compression
|
||||
|
|
|
@ -549,3 +549,4 @@ label_registration_automatic_activation: activación automática de cuenta
|
|||
label_registration_manual_activation: activación manual de cuenta
|
||||
notice_account_pending: "Su cuenta ha sido creada y está pendiende de la aprobación por parte de administrador"
|
||||
setting_time_format: Formato de hora
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -180,6 +180,7 @@ setting_self_registration: Inscription des nouveaux utilisateurs
|
|||
setting_attachment_max_size: Taille max des fichiers
|
||||
setting_issues_export_limit: Limite export demandes
|
||||
setting_mail_from: Adresse d'émission
|
||||
setting_bcc_recipients: Destinataires en copie cachée (cci)
|
||||
setting_host_name: Nom d'hôte
|
||||
setting_text_formatting: Formatage du texte
|
||||
setting_wiki_compression: Compression historique wiki
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -547,3 +547,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -547,3 +547,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manualna aktywacja kont
|
|||
notice_account_pending: "Twoje konto zostało utworzone i oczekuje na zatwierdzenie administratora."
|
||||
field_time_zone: Strefa czasowa
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -546,3 +546,4 @@ label_registration_manual_activation: активировать аккаунты
|
|||
notice_account_pending: "Ваш аккаунт уже создан и ожидает подтверждения администратора."
|
||||
field_time_zone: Часовой пояс
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -547,3 +547,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -547,3 +547,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -549,3 +549,4 @@ label_registration_manual_activation: manual account activation
|
|||
notice_account_pending: "Your account was created and is now pending administrator approval."
|
||||
field_time_zone: Time zone
|
||||
text_caracters_minimum: Must be at least %d characters long.
|
||||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
|
|
|
@ -153,8 +153,8 @@ width: 200px;
|
|||
|
||||
#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
|
||||
|
||||
#settings .tabular p{ padding-left: 300px; }
|
||||
#settings .tabular label{ margin-left: -300px; width: 295px; }
|
||||
.tabular.settings p{ padding-left: 300px; }
|
||||
.tabular.settings label{ margin-left: -300px; width: 295px; }
|
||||
|
||||
.required {color: #bb0000;}
|
||||
.summary {font-style: italic;}
|
||||
|
|
Loading…
Reference in New Issue