Skip to content

Commit 7a33599

Browse files
committed
Use zendesk reply-to email for bounce notifications
1 parent cc2d218 commit 7a33599

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

app/mailers/bounce_notification_mailer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class BounceNotificationMailer < GovukNotifyRails::Mailer
33

44
def bounce_notification_email(form:, group_name:, user:, user_role:, deliveries:, bounced_on_date:)
55
set_template(Settings.govuk_notify.bounce_notification_to_group_admins_template_id)
6+
set_email_reply_to(Settings.govuk_notify.zendesk_reply_to_id)
67

78
# We're assuming that all bounces are for the same reason
89
hard_bounce = hard_bounce?(deliveries.first)

config/settings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ govuk_one_login:
2323
# Settings for GOV.UK Notify api & email templates
2424
govuk_notify:
2525
api_key: changeme
26+
zendesk_reply_to_id: 0acefa17-04b5-4614-a2ad-6c7f17dd26ab
2627
form_submission_email_reply_to_id: fab9373b-fb7c-483f-ae25-5a9852bfcc04
2728
form_submission_email_template_id: 427eb8bc-ce0d-40a3-bf54-d76e8c3ec916
2829
form_filler_confirmation_email_template_id: 2d1f36dc-9799-43dd-8673-b631f9e0b4a5

spec/mailers/bounce_notification_mailer_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
it "sets the template" do
3434
expect(mail.govuk_notify_template).to eq "some-template-id"
3535
end
36+
37+
it "sends an email with the correct reply-to value" do
38+
expect(mail.govuk_notify_email_reply_to).to eq(Settings.govuk_notify.zendesk_reply_to_id)
39+
end
3640
end
3741

3842
describe "personalisation for the user role" do

0 commit comments

Comments
 (0)