`
accpzgp
  • 浏览: 13673 次
  • 性别: Icon_minigender_1
  • 来自: 天津
最近访客 更多访客>>
社区版块
存档分类
最新评论

代码获取邮箱内容

 
阅读更多

用代码实现登入我的油箱并读取我的邮件发件人、主题、内容、等信息:

java主要代码:
try{
propertiesp=newproperties();
Sessions=Session.getInstance(p,null);
Storest=s.getStore("POP3");
st.connect("host","username","password");
Folderf=st.getForder("inbox");
f.open(Foder.READ_ONLY);
Messagems=f.getMessages();
for(inti=0;i<ms.length;i++){
System.out.println(ms[i].getContent());
}
}catch(Exceptionex){

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics