如何将 Apache Commons Email 生成的电子邮件的编码更改为 UTF-8?我想发送根据收件人的语言生成的电子邮件,并且我需要考虑日语和俄语。问题是:Email 类没有提出我可以传递给的 UTF-8 常量Email.setCharset
方法。有什么线索吗?
Apache Commons Email API 中似乎有一个 UTF_8 常量:
UTF_8
static final String UTF_8
See Also:
Constant Field Values
All Known Implementing Classes:
Email, HtmlEmail, ImageHtmlEmail, MultiPartEmail, SimpleEmail
其定义于http://commons.apache.org/email/apidocs/src-html/org/apache/commons/mail/EmailConstants.html#line.38 http://commons.apache.org/email/apidocs/src-html/org/apache/commons/mail/EmailConstants.html#line.38 as:
String UTF_8 = "utf-8";
See http://commons.apache.org/email/apidocs/org/apache/commons/mail/EmailConstants.html http://commons.apache.org/email/apidocs/org/apache/commons/mail/EmailConstants.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)