pay icon indicating copy to clipboard operation
pay copied to clipboard

Use email_address_with_name helper in user_mailer

Open mguidetti opened this issue 2 years ago • 2 comments

This change adds the ActionMailer::Base#email_address_with_name helper added in Rails 6 to UserMailer so that customer names with special characters are escaped.

Previously, the mailer could throw a Net::SMTPSyntaxError error if customer names had special characters. I ran across this with a customer who had a comma and period in their name. (eg: "Business Name, Inc.")

mguidetti avatar Jun 19 '22 14:06 mguidetti

Ah, my mistake. I thought this helper was added in 6.0, but looks like it was a 6.1 addition. Will look for a 6.0 compatible solution

mguidetti avatar Jun 19 '22 15:06 mguidetti

I extracted out rails 6.1's email_address_with_name helper here so that the gem can still be compatible with 6.0

mguidetti avatar Jul 01 '22 23:07 mguidetti

Thanks for this!

excid3 avatar Nov 18 '22 02:11 excid3