From 8f731063c3a73ae2585abd4f949611f153be9421 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 20 Jul 2007 20:04:30 +0000
Subject: [PATCH] Add a general framework for OpenDS to send e-mail messages, and add an SMTP alert handler that can be used to send e-mail messages in response to administrative alerts generated within the server.
---
opends/src/server/org/opends/server/messages/ExtensionsMessages.java | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/messages/ExtensionsMessages.java b/opends/src/server/org/opends/server/messages/ExtensionsMessages.java
index e4006f6..c8cdadb 100644
--- a/opends/src/server/org/opends/server/messages/ExtensionsMessages.java
+++ b/opends/src/server/org/opends/server/messages/ExtensionsMessages.java
@@ -5512,6 +5512,27 @@
/**
+ * The message ID for the message that will be used if the Directory Server is
+ * not configured with information about any SMTP servers. This does not take
+ * any configuration arguments.
+ */
+ public static final int MSGID_SMTPALERTHANDLER_NO_SMTP_SERVERS =
+ CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_MILD_ERROR | 531;
+
+
+
+ /**
+ * The message ID for the message that will be used if an error occurs while
+ * trying to send an e-mail message. This takes three arguments, which are
+ * the alert type, the alert message, and a string representation of the
+ * exception that was caught.
+ */
+ public static final int MSGID_SMTPALERTHANDLER_ERROR_SENDING_MESSAGE =
+ CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_WARNING | 532;
+
+
+
+ /**
* Associates a set of generic messages with the message IDs defined in this
* class.
*/
@@ -7919,6 +7940,17 @@
"The password policy state extended request included an " +
"operation with an invalid or unsupported operation type " +
"of %s");
+
+
+ registerMessage(MSGID_SMTPALERTHANDLER_NO_SMTP_SERVERS,
+ "The Directory Server is not configured with any " +
+ "SMTP servers. The SMTP alert handler cannot be used " +
+ "unless the Directory Server is configured with " +
+ "information about at least one SMTP server");
+ registerMessage(MSGID_SMTPALERTHANDLER_ERROR_SENDING_MESSAGE,
+ "An error occurred when trying to send an e-mail message " +
+ "for administrative alert with type %s and message %s: " +
+ "%s");
}
}
--
Gitblit v1.10.0