From 3c69430b947c1c1ea61e25ad9275b14df005a3c7 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Wed, 15 Nov 2023 23:42:48 +0200 Subject: [PATCH] fix email friendly name --- app/models/submitter.rb | 2 +- app/models/user.rb | 2 +- lib/action_mailer_configs_interceptor.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/submitter.rb b/app/models/submitter.rb index c6ba2f719..36c215085 100644 --- a/app/models/submitter.rb +++ b/app/models/submitter.rb @@ -61,7 +61,7 @@ def status def friendly_name if name.present? && email.present? && email.exclude?(',') - "#{name} <#{email}>" + %("#{name.delete('"')}" <#{email}>) else email end diff --git a/app/models/user.rb b/app/models/user.rb index 23a6239c7..68112c2e2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -94,7 +94,7 @@ def full_name def friendly_name if full_name.present? - "#{full_name} <#{email}>" + %("#{full_name.delete('"')}" <#{email}>) else email end diff --git a/lib/action_mailer_configs_interceptor.rb b/lib/action_mailer_configs_interceptor.rb index 9902ca3c0..eaf8b7a5b 100644 --- a/lib/action_mailer_configs_interceptor.rb +++ b/lib/action_mailer_configs_interceptor.rb @@ -23,7 +23,7 @@ def delivering_email(message) if email_configs message.delivery_method(:smtp, build_smtp_configs_hash(email_configs)) - message.from = "#{email_configs.account.name} <#{email_configs.value['from_email']}>" + message.from = %("#{email_configs.account.name.to_s.delete('"')}" <#{email_configs.value['from_email']}>) else message.delivery_method(:test) end