我定时任务邮件经常会有发送失败,但是大部分会成功,不知道是什么原因
报错信息如下:
邮件发送失败
file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.schedule.output.EmailException: javax.mail.MessagingException: Unknown SMTP host: file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\SMTP.exmail.qq.com;
nested exception is:
file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.UnknownHostException: file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\SMTP.exmail.qq.com
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.schedule.output.EmailNotification.doFileAction(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.schedule.output.EmailNotification.doFileAction(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.fs.schedule.job.DoFileActionJob.doFileAction(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.fs.schedule.job.ViewReportletJob.executeReportByUsername(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.fs.schedule.job.ViewReportletJob.executeScheduledOutput(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.fs.schedule.job.ViewReportletJob.executeReport(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.fs.schedule.job.ReportletJob.execute(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.third.org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.third.org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: javax.mail.MessagingException: Unknown SMTP host: file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\SMTP.exmail.qq.com;
nested exception is:
file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.UnknownHostException: file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\SMTP.exmail.qq.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1389)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
at javax.mail.Service.connect(Service.java:288)
at javax.mail.Service.connect(Service.java:169)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.base.EmailManager.connect(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.base.EmailManager.send(Unknown Source)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.fr.base.EmailManager.send(Unknown Source)
... 9 more
Caused by: file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.UnknownHostException: file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\SMTP.exmail.qq.com
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.Socket.connect(Socket.java:589)
at file:///C:\Users\ADMINI~1.IVO\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngjava.net.Socket.connect(Socket.java:538)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
... 15 more