public class SendmailEmailExaminer
extends atg.service.email.examiner.EmailExaminerImpl
getMonitoredBounceReplyCodes
array.
A message is considered bounced if the String "<<< " + Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
mEmailTrackingTools, mExtractOriginalMessageIDFromMessageText, mScanningContentForAdditionalHeaders, X_ATG_HEADER_PREFIX
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SendmailEmailExaminer() |
Modifier and Type | Method and Description |
---|---|
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 |
getBouncedEmailAddress(java.lang.String pContent)
This method gets any associated error message that is given
from a bounced email.
|
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 according to RFC 1893 that gives
more detail on the nature of the error.
|
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)
This method gets any associated error message that is given
from a bounced email.
|
int |
getBouncedIndicatorEndIndex(java.lang.String pContent)
This method gets the ending index of the bounced indicator
For this implementation, it is expected that there are 7
chars in the bounced indicator, and this the end index is
7 chars after the start
|
int |
getBouncedIndicatorStartIndex(java.lang.String pContent)
This method takes the given string of email content and looks
for the pattern that indicates that this email is bounced.
|
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 (RFC 821) of the given bounced message.
|
java.lang.String[] |
getMonitoredBounceReplyCodes()
Gets the MonitoredReplyCodes property
|
boolean |
isBouncedEmail(javax.mail.Message pMessage)
Determines whether the passed in message was bounced by
a sendmail MTA.
|
boolean |
isBouncedEmail(java.lang.String pContent)
Determines whether the passed in message was bounced by
a sendmail MTA.
|
void |
setMonitoredBounceReplyCodes(java.lang.String[] pMonitoredBounceReplyCodes)
Sets the MonitoredBounceReplyCodes property
|
getAdditionalHeaderPrefixes, getAdditionalHeaders, getConfiguredSoftBounceCodes, getEmailTrackingTools, getMTAName, getOriginalMessageID, getSoftBounceEnhancedStatusCodes, getSoftBounceReplyCodes, getTrackingData, isExtractOriginalMessageIDFromMessageText, isScanningContentForAdditionalHeaders, isSoftBouncedEmail, setAdditionalHeaderPrefixes, setEmailTrackingTools, setExtractOriginalMessageIDFromMessageText, setMTAName, setScanningContentForAdditionalHeaders, setSoftBounceEnhancedStatusCodes, setSoftBounceReplyCodes
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
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, then this message will be considered bouncedpMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic java.lang.String getBouncedEmailAddress(javax.mail.Message pMessage) throws javax.mail.MessagingException, EmailException
pMessage
- the message to examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- 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 examinepMessage
i.e. the formatting is not what was
expected, or the message has not been determined as bouncedjavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- 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 examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- 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 examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- 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 examinejavax.mail.MessagingException
- if a problem occurs while calling
methods on the pMessage
objectEmailException
- if a problem occurs during the parsing
of the content, of invalid arguments are specifiedpublic int getBouncedIndicatorStartIndex(java.lang.String pContent)
monitoredBounceReplyCodes
and will substitute them into the pattern to see if the given
string contains it.pContent
- the email content to examinepublic int getBouncedIndicatorEndIndex(java.lang.String pContent)
pContent
- the content to examinepublic boolean isBouncedEmail(java.lang.String pContent)
monitoredBounceReplyCodes
property, then this message will be considered bouncedpContent
- the content to examinepublic java.lang.String getBouncedEmailAddress(java.lang.String pContent)
pContent
- the content to examinepublic java.lang.String getBouncedReplyCode(java.lang.String pContent)
getMonitoredBounceReplyCodes
array. This implementation looks for the reply code after the
sendmail session transcript line that starts with "<<< "pConte
- the bounced content to examinepMessage
i.e. the formatting is not what was
expected, or the message has not been determined as bouncedpublic java.lang.String getBouncedEnhancedStatusCode(java.lang.String pContent)
pContent
- the content to examinepublic java.lang.String getBouncedErrorMessage(java.lang.String pContent)
pContent
- the content to examine