有教练TMail,以与“引用可打印”编码的身体一个简单的方法? 我只看到方法有用于解码这样的内容,而不是创建它。
Answer 1:
你只是使用TMail
,或者你使用它ActionMailer
? 它看起来像TMail
本身不具有编码的能力quoted-printable
。 然而,它看起来像ActionMailer
确实有这个能力。
它看起来像TMail
允许您设置的Content-Transfer-Encoding
头如下: -
mail = TMail::Mail.new
mail.transfer_encoding = "quoted-printable"
但看起来,这实际上并不编码体。
你可以看到ActionMailer
设置这个头在这里 。 quoted-printable
似乎是默认ActionMailer
。
ActionMailer
拥有的ActionMailer ::报价:: quoted_printable方法对身体编码为quoted-printable
。 也许你可以使用这个...?
文章来源: Ruby email encoding and quoted-printable content