Interface MessageTransaction
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MessageTransaction.Reason
Reasons for denying the Transaction.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
fileError(String destination, String reason, String bodySubtype, String body)
File an error message.String
getFrom()
String
getIDHash(DupeDetection dupeDetection)
Get an ID Hash that is valid in the context of the givenDupeDetection
mode.javax.mail.internet.MimeMessage
getMessage()
String
getMessageID()
List<String>
getRecipients()
SocketAddress
getRemoteAddress()
void
reject(MessageTransaction.Reason reason, String message)
Rejects the given message and causes to abort the transaction.void
send(javax.mail.internet.MimeMessage message)
Send aMessage
.void
setIDHash(DupeDetection dupeDetection, String idHash)
The the ID Hash that is valid in the context of the givenDupeDetection
mode.
-
-
-
Method Detail
-
getMessage
javax.mail.internet.MimeMessage getMessage()
- Returns:
- The
Message
itself.
-
getMessageID
String getMessageID()
- Returns:
- The Message ID (from the mail header)
-
reject
void reject(MessageTransaction.Reason reason, String message)
Rejects the given message and causes to abort the transaction.- Parameters:
reason
- Why the transaction was rejectedmessage
- A more detailed message.
-
getRemoteAddress
SocketAddress getRemoteAddress()
- Returns:
- The location from where the message was delivered (if applicable)
-
fileError
void fileError(String destination, String reason, String bodySubtype, String body)
File an error message. It is implementation specific how the transaction will handle this.- Parameters:
destination
- A recipient of the error report.reason
- The reason of the errorbodySubtype
- the subtype of the message. (i.e. "plain" or "html")body
- A detailed report.
-
send
void send(javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
Send aMessage
.- Parameters:
message
- TheMessage
to send- Throws:
javax.mail.MessagingException
-
setIDHash
void setIDHash(DupeDetection dupeDetection, String idHash)
The the ID Hash that is valid in the context of the givenDupeDetection
mode.- Parameters:
dupeDetection
- the contextidHash
- the ID Hash.- See Also:
getIDHash(DupeDetection)
-
getIDHash
String getIDHash(DupeDetection dupeDetection)
Get an ID Hash that is valid in the context of the givenDupeDetection
mode. That means that in oneDupeDetection
mode, two mails can have the same, but in another mode those two mails can a different ID Hash.- Parameters:
dupeDetection
- The context of the requested ID Hash- Returns:
- An ID Hash
-
-