javax.mail.MessagingException: Connect failed;
nested exception is:
java.io.IOException: Unexpected response: 220 oa1.mail.cpic.com.cn ESMTP Service (Lotus Domino Release 8.5.3) ready at Wed, 17 Jun 2015 21:40:30 +0800
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
at javax.mail.Service.connect(Service.java:288)
at com.cpic.caf.mail.quartz.MailQuartz.saveEventByStatus(MailQuartz.java:98)
at com.cpic.caf.mail.quartz.MailQuartz.process(MailQuartz.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:312)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.io.IOException: Unexpected response: 220 oa1.mail.cpic.com.cn ESMTP Service (Lotus Domino Release 8.5.3) ready at Wed, 17 Jun 2015 21:40:30 +0800
at com.sun.mail.pop3.Protocol.simpleCommand(Protocol.java:374)
java读取邮件时报错,不知道啥原因,求指教,我用户名和密码都是正确的,在网站能登录看邮件
答案:2 悬赏:0 手机版
解决时间 2021-02-19 17:33
- 提问者网友:沉默的哀伤
- 2021-02-19 10:54
最佳答案
- 五星知识达人网友:等灯
- 2021-02-19 11:31
pop 3服务器:连接尝试,但未配置在pop3internet站点文档中)
全部回答
- 1楼网友:冷風如刀
- 2021-02-19 12:00
public boolean sendout()
{
try
{
mimemessage.setcontent(mp);
mimemessage.savechanges();
session mailsession = session.getinstance(props, null);
transport transport = mailsession.gettransport("smtp");
transport.connect(hostname, username, password);
transport.sendmessage(mimemessage, mimemessage.getrecipients(javax.mail.message.recipienttype.to));
transport.close();
}
catch(exception e)
{
e.printstacktrace();
return false;
}
return true;
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯