Java Mail API - Encoding problems

前端 未结 9 1380
野趣味
野趣味 2020-12-31 11:14

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

9条回答
  •  独厮守ぢ
    2020-12-31 11:48

    the following charset working to me: charset=ISO-8859-1, example:

    mail.setContent(testMail.getTexto(), "text/plain; charset=ISO-8859-1");
    

提交回复
热议问题