If any type of error occurs as part of sending the email, the error string will be available to the enclosing policy in the local variable named error.do-send-email-from-template. Otherwise that local variable will be unavailable.
http://developer.novell.com/documentation/dirxml/dirxmlbk/ref/dirxmlscript/do-send-email-from-template.html