diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index b83258ce5..6aab30e77 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -106,6 +106,7 @@ jobs: APP_NAME: dluhc-core CORE_EMAIL_USERNAME: ${{ secrets.CORE_EMAIL_USERNAME }} CORE_EMAIL_PASSWORD: ${{ secrets.CORE_EMAIL_PASSWORD }} + APP_HOST: ${{ secrets.APP_HOST }} run: | cf7 api $CF_API_ENDPOINT cf7 auth @@ -114,4 +115,5 @@ jobs: cf7 set-env $APP_NAME API_KEY $API_KEY cf7 set-env $APP_NAME CORE_EMAIL_USERNAME $CORE_EMAIL_USERNAME cf7 set-env $APP_NAME CORE_EMAIL_PASSWORD $CORE_EMAIL_PASSWORD + cf7 set-env $APP_NAME APP_HOST $APP_HOST cf7 push --strategy rolling diff --git a/app/views/devise/mailer/_password_change_initial.html.erb b/app/views/devise/mailer/_password_change_initial.html.erb index 6645c7c77..39363dc53 100644 --- a/app/views/devise/mailer/_password_change_initial.html.erb +++ b/app/views/devise/mailer/_password_change_initial.html.erb @@ -1,6 +1,6 @@

Hello <%= @resource.name %>!

-

An account has been created for you to submit CORE data on behalf of @resource.organisation.

+

An account has been created for you to submit CORE data on behalf of <%= @resource.organisation %>.

-

Your username is <% @resource.email %>, use the link below to set your password. +

Your username is <%= @resource.email %>, use the link below to set your password.

<%= govuk_link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

diff --git a/config/environments/production.rb b/config/environments/production.rb index 45b256ef5..dcb239817 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -58,6 +58,8 @@ Rails.application.configure do config.action_mailer.perform_caching = false + config.action_mailer.default_url_options = { host: ENV['APP_HOST'], port: 3000 } + # 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 diff --git a/config/environments/sandbox.rb b/config/environments/sandbox.rb index 45b256ef5..dcb239817 100644 --- a/config/environments/sandbox.rb +++ b/config/environments/sandbox.rb @@ -58,6 +58,8 @@ Rails.application.configure do config.action_mailer.perform_caching = false + config.action_mailer.default_url_options = { host: ENV['APP_HOST'], port: 3000 } + # 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