Javamail changing charset of subject line

前端 未结 6 2028
旧巷少年郎
旧巷少年郎 2021-02-13 20:28

I am using Javamail (javax.mail) to send mails. I successfully adjusted contents of my mail as utf-8. However I could not set subject line as a utf-8 encoded string.

I t

6条回答
  •  感情败类
    2021-02-13 21:17

    I ran into a similar problem with Apache Camel Mail, which uses Java Mail. Setting

    exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");

    before routing to SMTP, solved the problem.

提交回复
热议问题