Hi, I would like to include the full error message that occurs if an email cannot be delivered. I have created a BounceMailet that inserts some data into my database and everything is working except for the actual error message. The error message I get is, wait for it...
'6' I thought this was interesting, so I checked out the source, and its this line in the RemoteDelivery class that sets that value: mail.setErrorMessage(retries + ""); (line 661) Ok, so I'm set to 6 retries currently (going to change that to 3 right now) so that matches up. However, what I would really like to see is what is seen in the logs, something like: 30/09/06 13:52:13 INFO James.Mailet: RemoteDelivery: Could not connect to SMTP host: 208.48.34.132, port: 25; nested exception is: java.net.ConnectException: connection to 208.48.34.132 timed out 30/09/06 13:52:13 INFO James.Mailet: RemoteDelivery: Temporary exception delivering mail (Mail1159642077612-3-to-test.com: javax.mail.MessagingException: No mail server(s) available at this time. at org.apache.james.transport.mailets.RemoteDelivery.deliver( RemoteDelivery.java:617) at org.apache.james.transport.mailets.RemoteDelivery.run( RemoteDelivery.java:912) at java.lang.Thread.run(Thread.java:595) I can't see anywhere else in the RemoteDelivery class where the above error message is associated to the org.apache.mailet.Mail object that I'm working with in my BounceMailet, but it seems to me like I might be missing something because that seems like a natural thing to do. Or maybe there is some other way to get access to the error message (context or something), I'm not sure. Can anyone straighten me out here, or do I have to hack up RemoteDelivery to do this? Thanks, Mark