fix email friendly name

pull/150/merge
Pete Matsyburka 2 years ago
parent c0162bccc8
commit 3c69430b94

@ -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

@ -94,7 +94,7 @@ class User < ApplicationRecord
def friendly_name
if full_name.present?
"#{full_name} <#{email}>"
%("#{full_name.delete('"')}" <#{email}>)
else
email
end

@ -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

Loading…
Cancel
Save