David Wall wrote: > Does anybody know of any good Java/servlet code that handles email > bounce processing? When our automated systems send an email that > bounces (lots of hotmail bounce if the user has an account but just > hasn't logged in the past 30 days), we'd like a "somewhat reliable" > mechanism to associate the bounce with a transaction in our system. > I'd guess I'd put a special header in so that bounces that return > headers or return the original message can be parsed.
Hi David, I've just done exactly that with the Exim mailserver, the JavaMail and Java Timer API inside Tomcat. The "mangling" process you mentioned is called VERP which stands for Variable Envelope Return Paths. The gist is that when I send an email out to [EMAIL PROTECTED], the return path header on the email is set to: [EMAIL PROTECTED] As long as you configure your SMTP server to recognise these bounce messages and deliver them to a mailbox, you can use JavaMail to poll for updates, parse the TO: field using a regular expression and then move the parsed email to a sub-folder, say. This doesn't affect your reply-to address on the emails. If it is delivered successfully, and the reciepient tries to reply, it will be delivered as expected - the return path header is ignored. HTH. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]