SMTP mailbox unavailable - intermittent and self-inflicted
- by user134451
I have an app that runs daily, sending confirmation emails to dozens of customers. Emails are sent using SMTP with authentication. The app also has some error handling, and occasionally anonymous SMTP is used to notify the webmaster that an e-mail issue has been encountered (a malformed email address, usually). Whenever these warning notifications are sent, the customer notifications that follow throw an error: "Mailbox unavailable. The server response was: 5.7.1 Unable to relay".
The customer notification emails are sent, but my app drops into the exception handler. And all subsequent customer notification emails have this problem. Everything is fine next time the programs run, until a webmaster warning email is sent.
Anyone have an ideas what would cause this? My first thought was that the client didn't like being switched back and forth between anonymous to authenticated modes. I created a separate client for each mode, but that didn't help.