added ability to execute user code when message moved to error queue i.e. send an email