I\'m using Java Mail API and I\'m trying to send an email through Gmail\'s SMTP. How my program works: java.util.Scanner class is used to get user input - I\'m asking user f
Use the encodeText method from MimeUtility:
MimeUtility.encodeText(mail_subject, "UTF-8", "B")
(I don't know what "B" means, keep calm, and just use. Actually it can be "B" or "Q".)