My SMTP server supports 8-bit MIME. How can I tell JavaMail to use it?

John Zukowski

Set the mail.smtp.allow8bitmime property to true:

props.put("mail.smtp.allow8bitmime", "true");

This works with Sun's SMTP provider. Other providers may differ. According to the docs:

If set to true, and the server supports the 8BITMIME extension, text parts of messages that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC2045 rules for 8bit text.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact