java mail 报错550 Mailbox not found or access denied

运行了几年的发邮件程序,最近集体发邮件报错

org.springframework.mail.MailSendException: Failed messages: javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 Mailbox not found or access denied
; message exception details (1) are:
Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 Mailbox not found or access denied

	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:2014)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1258)
	at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:448)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
	at com.dongExcel.Utils.sendInlineMail(Utils.java:133)
	at com.dongExcel.Task.two2(Task.java:110)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 Mailbox not found or access denied

	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1867)
	... 20 more

报错信息提示邮箱找不到,但是接收人邮箱确定没有错误,因为一直正常运行。

网上说550是您要发送的收件人短时间内收到大量邮件,为避免受到恶意攻击,暂时禁止向该收件人发信,建议稍后再试,可是试了很多次依旧没有用。

找了好久,才发现是因为一个同事离职了,他的邮箱注销,但是还在发送列表里,导致这个问题,删除恢复正常。

你可能感兴趣的:(java)