org.apache.james.transport.mailets
Class OnlyText

java.lang.Object
  extended by org.apache.mailet.base.GenericMailet
      extended by org.apache.james.transport.mailets.OnlyText
All Implemented Interfaces:
Mailet, MailetConfig

public class OnlyText
extends GenericMailet

Keep only the text part of a message.

If the message is text only then it doesn't touch it, if it is a multipart it transform it a in plain text message with the first text part found.
- text/plain
- text/html => with a conversion to text only
- text/* as is.


Constructor Summary
OnlyText()
           
 
Method Summary
 java.lang.String decodeEntities(java.lang.String data)
           
 java.lang.String getMailetInfo()
          returns a String describing this mailet.
 java.lang.String html2Text(java.lang.String html)
           
 void init()
           
 void service(Mail mail)
           
 
Methods inherited from class org.apache.mailet.base.GenericMailet
arrayToString, checkInitParameters, destroy, getInitParameter, getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlyText

public OnlyText()
Method Detail

getMailetInfo

public java.lang.String getMailetInfo()
returns a String describing this mailet.

Specified by:
getMailetInfo in interface Mailet
Overrides:
getMailetInfo in class GenericMailet
Returns:
A desciption of this mailet

init

public void init()
          throws MailetException
Overrides:
init in class GenericMailet
Throws:
MailetException

service

public void service(Mail mail)
             throws MailetException
Specified by:
service in interface Mailet
Specified by:
service in class GenericMailet
Throws:
MailetException

html2Text

public java.lang.String html2Text(java.lang.String html)

decodeEntities

public java.lang.String decodeEntities(java.lang.String data)


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.