public interface MessageHandler
from()
recipient()
(possibly more than once)data()
done()
Modifier and Type | Method and Description |
---|---|
void |
data(java.io.InputStream data)
Called when the DATA part of the SMTP exchange begins.
|
void |
done()
Called after all other methods are completed.
|
void |
from(java.lang.String from)
Called first, after the MAIL FROM during a SMTP exchange.
|
void |
recipient(java.lang.String recipient)
Called once for every RCPT TO during a SMTP exchange.
|
void from(java.lang.String from) throws RejectException
from
- is the sender as specified by the client. It will
be a rfc822-compliant email address, already validated by
the server.RejectException
- if the sender should be denied.DropConnectionException
- if the connection should be droppedvoid recipient(java.lang.String recipient) throws RejectException
recipient
- is a rfc822-compliant email address,
validated by the server.RejectException
- if the recipient should be denied.DropConnectionException
- if the connection should be droppedvoid data(java.io.InputStream data) throws RejectException, TooMuchDataException, java.io.IOException
data
- will be the smtp data stream, stripped of any extra '.' chars. The
data stream will be valid only for the duration of the call.RejectException
- if at any point the data should be rejected.DropConnectionException
- if the connection should be droppedTooMuchDataException
- if the listener can't handle that much data.
An error will be reported to the client.java.io.IOException
- if there is an IO error reading the input data.void done()
Copyright © 2006–2014. All rights reserved.