public class SMTPFetcher extends MailFetcher implements Runnable
Listener thread, that accepts connection on port 25 (default) and delegates all work to its worker threads. It is a minimum implementation, it only implements commands listed in section 4.5.1 of RFC 2821.
If the mimetype of the message itself is not multipart, then the message can simply be stored in a object of the type 'emails'. The mime-type of the mail can be sotred in the mime-type field of the message.
If the mimetype of the orignal message is multipart/alternative, then only the 'best' part is stored in the mmbase email node. Currently only text/plain and text/html alternatives are recognized. text/html is supposed to be better.
If the mimetype of the orignal message is multipart/mixed, then the INLINE part can be stored in the object. If no disposition given on a part, then it is considered INLINE if text/*. If the disposition if ATTACHMENT, then those are stored as related attachment-objects.
TODO: What happens which attached mail-messages? Will those not cause a big mess?| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SMTPFetcher.State |
| Constructor and Description |
|---|
SMTPFetcher(Socket socket,
Map<String,String> properties)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getMaxAttachmentSize(Map<String,String> properties) |
protected Map<String,String> |
getProperties() |
List<MailHandler.Address> |
getRecipients() |
MailHandler.Address |
getSender() |
void |
interrupt()
Interrupt method, is called only during shutdown
|
void |
run()
The main run method of this thread.
|
getHandlerpublic MailHandler.Address getSender()
public List<MailHandler.Address> getRecipients()
public void run()
public void interrupt()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}