You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this recently. The cleanest thing appeared to be manually removing/replacing quotation marks in the names before attaching files, but it would be nice to have a proper fix. I'm happy to PR if someone can provide guidance about the correct encoding.
I got into this issue too. It would be nice to raise if the quotes isn't supported in attachment filename rather than silently creating an invalid email.
I came across to this issue in Ruby On Rails (rails/rails#14158), and have traced it, and it seems that it might be actually a bug in
mail
-gem.I have tried to fix it, but my dirty fix makes one other test to fail:
My "fix": https://github.com/jamox/mail/blob/fixing_fail_when_name_has_quotes/lib/mail/encodings.rb#L98-L110
Error occurs when in: https://github.com/mikel/mail/blob/master/lib/mail/attachments_list.rb#L40
we have
name = 'invoice "for you".pdf'
and then we insert it intoThus getting
And later we get the filename
\"invoice \"for you\".pdf\"
=>"invoice "for you".pdf"
...Id be happy to fix this (in case this ain't due to misuse of this library) :)
The text was updated successfully, but these errors were encountered: