diff --git a/app/models/submitter.rb b/app/models/submitter.rb index c6ba2f71..36c21508 100644 --- a/app/models/submitter.rb +++ b/app/models/submitter.rb @@ -61,7 +61,7 @@ class Submitter < ApplicationRecord 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 23a6239c..68112c2e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -94,7 +94,7 @@ class User < ApplicationRecord 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 9902ca3c..eaf8b7a5 100644 --- a/lib/action_mailer_configs_interceptor.rb +++ b/lib/action_mailer_configs_interceptor.rb @@ -23,7 +23,7 @@ module ActionMailerConfigsInterceptor 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