<%#-- copyright OpenProject is a project management system. Copyright (C) 2012-2017 the OpenProject Foundation (OPF) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: Copyright (C) 2006-2017 Jean-Philippe Lang Copyright (C) 2010-2013 the ChiliProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> <% if @deliveries %> <%= styled_form_tag({action: 'edit', tab: 'notifications'}) do %>
<%= setting_text_field :mail_from, size: 60 %>
<%= setting_check_box :bcc_recipients %>
<%= setting_check_box :plain_text_mail %>
<%= setting_select(:default_notification_option, User.valid_notification_options.collect {|o| [l(o.last), o.first.to_s]}) %>
<%=l(:text_select_mail_notifications)%> <%= hidden_field_tag 'settings[notified_events][]', '' %>
<% @notifiables.each do |notifiable| %> <%= notification_field notifiable %> <% end %>
<%= check_all_links('notified_events') %>
<%= l(:setting_emails_header) %> & <%= l(:setting_emails_footer) %> <%= cell Settings::TextSettingCell, I18n.locale, name: "emails_header" %> <%= cell Settings::TextSettingCell, I18n.locale, name: "emails_footer" %>
<%= content_tag :fieldset, id: "mail_configuration", class: "form--fieldset" do %> <%=l(:text_setup_mail_configuration)%>
<%= setting_select(:email_delivery_method, [:smtp, :sendmail], id: "email_delivery_method_switch") %>
<%= setting_text_field :smtp_address %>
<%= setting_text_field :smtp_port, size: 6 %>
<%= setting_text_field :smtp_domain %>
<%= setting_select(:smtp_authentication, [:plain, :login, :cram_md5]) %>
<%= setting_text_field :smtp_user_name %>
<%= setting_password :smtp_password %>
<%= setting_check_box :smtp_enable_starttls_auto %>
<%= setting_text_field :sendmail_location %>
<% end unless OpenProject::Configuration['email_delivery_configuration'] == 'legacy' %> <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %>
<%= link_to l(:label_send_test_email), { controller: '/admin', action: 'test_email' }, method: :post %>
<% end %> <% else %>
<%= simple_format(l(:text_email_delivery_not_configured)) %>
<% end %>