by johnmunro >> Sat, 4 Jan 2003 14:16:24 GMT
I am trying to add a feature to our exception handler which automatically emails an exception report to a designated address. Using this, we wouldn't need to rely on users writing down exception details or sysadmins mailing us exception logs - we would be getting the information straight from the horse's mouth.
The SMTP connection requires a notification to be set up so that the connection object receives an event when the message has been sent (or has failed for whatever reason). In the event handler for this notification, the connection object is to delete itself; the exception handler then detects that the connection object has been deleted and continues processing from there. This is all straight out of the CardSchema SMTP documentation.
The problem is that the notification is never received, so the connection is never deleted, so the exception handler never continues processing.
The notification stuff seems to work fine when the email method is called from a jadescript, and the only thing I can see that is different is that the process is in exception state.
Does anyone know whether there is some sort of restriction on notifications when in exception state? Does anyone have an idea how to get around it?
I actually do have a workaround (the exception handler waits for Connection.state = Disconnected), but it leaves me with the feeling that it won't always work... and if we start using these emails as a part of our support strategy, we'll need to be confident that they're being sent whenever an exception is raised...
John Munro
---
Synergist Limited - Home of FileVision
The Bioscience Innovation Centre
Cowley Road, Cambridge, UK
CB4 0DS
Telephone: +44 (0) 1223 478200
Fax: +44 (0) 1223 477969
Email: john.munro@filevision.com
Web: http://www.filevision.com
The contents of this communication are confidential and are only intended to be read by the addressee. We apologize if you receive this communication in error and ask that you contact Synergist Limited immediately to arrange for its return. The use of any information contained in this communication by an unauthorized person is strictly prohibited. Synergist Limited cannot accept responsibility for the accuracy or completeness of this communication as it is being transmitted over a public network. If you suspect this message may have been intercepted or amended, please inform Synergist Limited.