|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.service.email.examiner.EmailExaminerImpl atg.service.email.examiner.EximEmailExaminer
public class EximEmailExaminer
This email examiner examines emails that are in Exim format
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.service.email.examiner.EmailExaminerImpl |
---|
mEmailTrackingTools, mExtractOriginalMessageIDFromMessageText, mScanningContentForAdditionalHeaders, X_ATG_HEADER_PREFIX |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
EximEmailExaminer()
|
Method Summary | |
---|---|
java.lang.Object |
examineEmail(javax.mail.Message pMessage)
This method examines the given message in some implementation specific manner. |
java.lang.String |
getBouncedEmailAddress(javax.mail.Message pMessage)
This method gets the email address from a presumed bounced email in sendmail format. |
java.lang.String |
getBouncedEnhancedStatusCode(javax.mail.Message pMessage)
Gets the enhanced status code according to RFC 1893 that gives more detail on the nature of the error. |
java.lang.String |
getBouncedEnhancedStatusCode(java.lang.String pContent)
Gets the enhanced status code from the given content, if any exists. |
java.lang.String |
getBouncedErrorMessage(javax.mail.Message pMessage)
This method gets any associated error message that is given from a bounced email. |
java.lang.String |
getBouncedErrorMessage(java.lang.String pContent)
Gets the error message for the given bounced email content It is assumed that the error message is after a triple dot in the same line that the reply code is present on. |
java.lang.String |
getBouncedReplyCode(javax.mail.Message pMessage)
Gets the reply code (RFC 821) of the given bounced message. |
java.lang.String |
getBouncedReplyCode(java.lang.String pContent)
Gets the reply code present in the given email content It's assumed that the reply code is present after the "]: " string in the given content |
java.lang.String[] |
getMonitoredBounceReplyCodes()
Gets the MonitoredReplyCodes property |
boolean |
isBouncedEmail(javax.mail.Message pMessage)
Determines whether the passed in message was bounced by an exim MTA. |
void |
setMonitoredBounceReplyCodes(java.lang.String[] pMonitoredBounceReplyCodes)
Sets the MonitoredBounceReplyCodes property |
Methods inherited from class atg.service.email.examiner.EmailExaminerImpl |
---|
getAdditionalHeaderPrefixes, getAdditionalHeaders, getEmailTrackingTools, getMTAName, getOriginalMessageID, getSoftBounceEnhancedStatusCodes, getSoftBounceReplyCodes, getTrackingData, isExtractOriginalMessageIDFromMessageText, isScanningContentForAdditionalHeaders, isSoftBouncedEmail, setAdditionalHeaderPrefixes, setEmailTrackingTools, setExtractOriginalMessageIDFromMessageText, setMTAName, setScanningContentForAdditionalHeaders, setSoftBounceEnhancedStatusCodes, setSoftBounceReplyCodes |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public EximEmailExaminer()
Method Detail |
---|
public void setMonitoredBounceReplyCodes(java.lang.String[] pMonitoredBounceReplyCodes)
pMonitoredBounceReplyCodes
- an array of RFC 821 reply codes
that will indicate an email is bounced. The isBouncedEmail
method will only return true if the reply code set in the bounced
email matches one of the values of this propertypublic java.lang.String[] getMonitoredBounceReplyCodes()
isBouncedEmail
method will only return true if the reply code set in the bounced
email matches one of the values of this propertypublic boolean isBouncedEmail(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
monitoredBounceReplyCodes
property, if set.
pMessage
- the message to examine
javax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
object
EmailException
- if a problem occurs during the parsing
of the header, or if invalid arguments are specifiedpublic java.lang.String getBouncedEmailAddress(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examine
javax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
object
EmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedReplyCode(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
getMonitoredBounceReplyCodes
array. This implementation looks for the reply code after the
sendmail session transcript line that starts with "<<< "
pMessage
- the bounced message to examine
pMessage
i.e. the formatting is not what was
expected, or the message has not been determined as bounced
javax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
object
EmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specified
NOTE: An exception should NOT be thrown if the given message
is not in a format recognized by this examiner. In most cases,
a list of examiners will be called upon to see if any consider
the message as bounced in a given operation. Developers are expected
to return null in this case.public java.lang.String getBouncedErrorMessage(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examine
javax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
object
EmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedEnhancedStatusCode(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examine
javax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
object
EmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.Object examineEmail(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examine
javax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
object
EmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedReplyCode(java.lang.String pContent)
pContent
- the content to examine
public java.lang.String getBouncedErrorMessage(java.lang.String pContent)
pContent
- the email content to examine
public java.lang.String getBouncedEnhancedStatusCode(java.lang.String pContent)
pContent
- the content to parse
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |