|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.mailet.GenericMailet
org.sakaiproject.james.SakaiMailet
public class SakaiMailet
SakaiMailet watches incoming mail (via James) and sends mail to the appropriate mail archive channel in Sakai.
| Field Summary | |
|---|---|
static String |
POSTMASTER
The user name of the postmaster user - the one who posts incoming mail. |
| Constructor Summary | |
|---|---|
SakaiMailet()
|
|
| Method Summary | |
|---|---|
protected org.sakaiproject.entity.api.Reference |
createAttachment(String siteId,
List attachments,
String type,
String fileName,
byte[] body,
String id)
Create an attachment, adding it to the list of attachments. |
void |
destroy()
Called when leaving. |
protected boolean |
fromValidUser(String fromAddr,
MailArchiveChannel channel)
Check if the fromAddr email address is recognized as belonging to a user who has permission to add to the channel. |
void |
init()
Called when created. |
protected Integer |
parseParts(String siteId,
javax.mail.Part p,
String id,
StringBuilder[] bodyBuf,
StringBuilder bodyContentType,
List attachments,
Integer embedCount)
Breaks email messages into parts which can be saved as files (saves as attachments) or viewed as plain text (added to body of message). |
protected byte[] |
readBody(int approxSize,
InputStream stream)
Read in a stream from the mime body into a byte array |
void |
service(org.apache.mailet.Mail mail)
Process incoming mail. |
| Methods inherited from class org.apache.mailet.GenericMailet |
|---|
getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetInfo, getMailetName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String POSTMASTER
| Constructor Detail |
|---|
public SakaiMailet()
| Method Detail |
|---|
public void init()
throws javax.mail.MessagingException
init in class org.apache.mailet.GenericMailetjavax.mail.MessagingExceptionpublic void destroy()
destroy in interface org.apache.mailet.Mailetdestroy in class org.apache.mailet.GenericMailet
public void service(org.apache.mailet.Mail mail)
throws javax.mail.MessagingException
service in interface org.apache.mailet.Mailetservice in class org.apache.mailet.GenericMailetmail - ...
javax.mail.MessagingException
protected boolean fromValidUser(String fromAddr,
MailArchiveChannel channel)
fromAddr - The email address to check.channel - The mail archive channel.
protected org.sakaiproject.entity.api.Reference createAttachment(String siteId,
List attachments,
String type,
String fileName,
byte[] body,
String id)
protected byte[] readBody(int approxSize,
InputStream stream)
protected Integer parseParts(String siteId,
javax.mail.Part p,
String id,
StringBuilder[] bodyBuf,
StringBuilder bodyContentType,
List attachments,
Integer embedCount)
throws javax.mail.MessagingException,
IOException
siteId - Site associated with attachments, if anyp - The message-part embedded in a message..id - The string containing the message's id.bodyBuf - The string-buffers in which the plain/text and/or html/text message body is being built.bodyContentType - The value of the Content-Type header for the mesage body.attachments - The ReferenceVector in which references to attachments are collected.embedCount - An Integer that counts embedded messages (outer message is zero).
javax.mail.MessagingException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||