开发者

error handling on SMTP sending using javax.mail

I writing a mail client for sending of email notification using Javax.mail SMTP. I need to validate the mail delivery开发者_JAVA百科. my first step ofcourse was to catch built in exception.

My question does those exceptioon cover delivery errors (i.e. failed delivery becouse of wrong adrress, target server not found etc) or do I need to do extra work to cover that.

Thanks,

Alex


Once the email is successfully delivered to the destination server, it's gone. If that server is a relay (as you would typically find in a corporate environment) the message could bounce later when the relay tries to send it to the real destination.

At that poing, a bounce message would be returned to the sending address. If you need to handle those, you need to ensure that the sending address is deliverable to a mailbox to which you have access. Then you need to somehow (i.e. procmail) get the incoming bounces to another program you write which handles them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜