fix email friendly name
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user