Reading the full email from GMail using JavaMail

后端 未结 5 493
日久生厌
日久生厌 2020-12-29 16:53

I am making use of javamail and I am having trouble getting the HTML from my gmail emails. I have the following:

Session session = Session.getDefaultInstance         


        
5条回答
  •  粉色の甜心
    2020-12-29 17:24

    You could use IOUtils of Apache Commons or can possibly even try something along the lines of :

    BufferedReader br = new BufferedReader(new InputStreamReader(daInputStream));
    String oneLine = "";
    while ( (oneLine = br.readLine()) !=  null )
        System.out.println(oneLine);
    

提交回复
热议问题