Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to handle failure  RSS feed

 
Santhosh Reddy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to handle failures while sending mail, for example if i had sent a mail to santhosh@abc.com which is not existing then, the mail format is correct but that email id is not existing then how to handle that situation.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to write code that periodically checks the mailbox for bounces. Handling those will involve parsing the bounce message to get the address that caused the problem. You can make it easier on yourself by including a unique ID in the subject line that you can easily extract.

Note that while bounces generally happen pretty quickly (in a matter of hours), they can easily take a day or two, and sometimes several weeks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!