Skip to content

Commit

Permalink
fix email friendly name
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Nov 15, 2023
1 parent c0162bc commit 3c69430
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/submitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def status

def friendly_name
if name.present? && email.present? && email.exclude?(',')
"#{name} <#{email}>"
%("#{name.delete('"')}" <#{email}>)
else
email
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def full_name

def friendly_name
if full_name.present?
"#{full_name} <#{email}>"
%("#{full_name.delete('"')}" <#{email}>)
else
email
end
Expand Down
2 changes: 1 addition & 1 deletion lib/action_mailer_configs_interceptor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c69430

Please sign in to comment.