diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e8b62205..7d10be5d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -46,9 +46,15 @@ class UsersController < ApplicationController @user.role = User.admin_role unless role_valid?(@user.role) if @user.save - UserMailer.invitation_email(@user).deliver_later! + begin + UserMailer.invitation_email(@user).deliver_later! - redirect_back fallback_location: settings_users_path, notice: I18n.t('user_has_been_invited') + redirect_back fallback_location: settings_users_path, notice: I18n.t('user_has_been_invited') + rescue StandardError => e + Rollbar.error(e) if defined?(Rollbar) + + redirect_back fallback_location: settings_users_path, alert: I18n.t('failed') + end else render turbo_stream: turbo_stream.replace(:modal, template: 'users/new'), status: :unprocessable_content end diff --git a/app/views/personalization_settings/show.html.erb b/app/views/personalization_settings/show.html.erb index 438da311..d0e60dc7 100644 --- a/app/views/personalization_settings/show.html.erb +++ b/app/views/personalization_settings/show.html.erb @@ -1,26 +1,28 @@
<%= render 'shared/settings_nav' %>
-

+

<%= t('email_templates') %> -

-
+

+
<%= render 'signature_request_email_form' %> <%= render 'documents_copy_email_form' %> <%= render 'submitter_completed_email_form' %> -
-

+ +

<%= t('company_logo') %> -

- <%= render 'logo_form' %> -

+

+
+ <%= render 'logo_form' %> +
+

<%= t('submission_form') %> -

-
+

+
<%= render 'form_completed_message_form' %> <%= render 'form_completed_button_form' %> <%= render 'form_policy_links_form' %> -
+ <%= render 'form_customization_settings' %>
diff --git a/config/environments/production.rb b/config/environments/production.rb index 8ead5001..047a971d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -73,9 +73,9 @@ Rails.application.configure do config.action_mailer.perform_caching = false - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - config.action_mailer.raise_delivery_errors = false + # Keep delivery errors visible in production by default so failed invite + # emails are observable. Set to false to silence errors if needed. + config.action_mailer.raise_delivery_errors = ENV.fetch('RAISE_EMAIL_DELIVERY_ERRORS', 'true') == 'true' if ENV['SMTP_ADDRESS'] config.action_mailer.delivery_method = :smtp diff --git a/docker-compose.yml b/docker-compose.yml index 099c115c..370a0391 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - ./docuseal:/data/docuseal - ${INTEBEC_CONFIG_FILE:-./config/config.yml}:/run/secrets/config.yml:ro environment: - - FORCE_SSL=${HOST} + - FORCE_SSL=${FORCE_SSL:-false} # File mode: mount a config.yml (see volumes below). # API mode: remove the volume mount and set INTEBEC_LICENCE_KEY + INTEBEC_SECRET_KEY. - INTEBEC_CONFIG_PATH=/run/secrets/config.yml