I am using a zip stone to send emails with UTF-8 content using this code
Mail.defaults do ... end Mail.deliver do from " user@example.com " to " otheruser@example.com " subject "Mäbülö..." body "Märchenbücher lösen Leseschwächen." end
This works, but gives a warning
Non US-ASCII detected and no charset defined. Defaulting to UTF-8, set your own if this is incorrect.
Now, after repeated polling attempts related to the creation of documentation related to the mail, as well as to the source code, I still cannot establish the encoding. Message.rb has a charset= method, but when I add a call to charset, for example:
Mail.deliver do from " user@example.com " to " otheruser@example.com " charset "UTF-8" subject "Mäbülö..." body "Märchenbücher lösen Leseschwächen." end
I get this ArgumentError:
/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:1423:in `charset': wrong number of arguments (1 for 0) (ArgumentError)
How to configure the encoding in the delivery block?
source share