Package org.compiere.server
Class EMailProcessor
- java.lang.Object
-
- org.compiere.server.EMailProcessor
-
public class EMailProcessor extends Object
Request Mail Processor- Version:
- $Id: EMailProcessor.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
- Author:
- Jorg Janke
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
DELIVERY
Process Delivery Confirmprotected static int
ERROR
Process Errorprotected static CLogger
log
Loggerprotected String
m_host
EMail Host Parameterprotected String
m_pass
Password Parameterprotected javax.mail.Session
m_session
Sessionprotected javax.mail.Store
m_store
Storeprotected String
m_user
EMail User Parameterprotected static int
REQUEST
Process Requestprotected static int
WORKFLOW
Process Workflow
-
Constructor Summary
Constructors Constructor Description EMailProcessor(String host, String user, String password)
EMail ProcessorEMailProcessor(MClient client)
EMail Processor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dumpBody(javax.mail.Part p)
Print Bodyprotected void
dumpEnvelope(javax.mail.Message m)
Print Envelopeprotected String
getDeliveredReportDetail(javax.mail.Part part)
Get Delivered Report Detailprotected String
getDeliveryReport(javax.mail.Part msg)
Get Delivery Reportprotected String
getMessage(javax.mail.Part msg)
Get Messageprotected javax.mail.Session
getSession()
Get Sessionprotected javax.mail.Store
getStore()
Get Storeprotected String
getSubject(javax.mail.Message msg)
Get Subjectstatic void
main(String[] args)
Main Testprotected static void
printOut(String s)
Printprotected int
processInBox()
Process InBoxprotected int
processMessage(javax.mail.Message msg)
Process Messageint
processMessages()
Process Messages in InBox
-
-
-
Field Detail
-
m_host
protected String m_host
EMail Host Parameter
-
m_user
protected String m_user
EMail User Parameter
-
m_pass
protected String m_pass
Password Parameter
-
m_session
protected javax.mail.Session m_session
Session
-
m_store
protected javax.mail.Store m_store
Store
-
log
protected static final CLogger log
Logger
-
ERROR
protected static final int ERROR
Process Error- See Also:
- Constant Field Values
-
REQUEST
protected static final int REQUEST
Process Request- See Also:
- Constant Field Values
-
WORKFLOW
protected static final int WORKFLOW
Process Workflow- See Also:
- Constant Field Values
-
DELIVERY
protected static final int DELIVERY
Process Delivery Confirm- See Also:
- Constant Field Values
-
-
Method Detail
-
processMessages
public int processMessages()
Process Messages in InBox- Returns:
- number of mails processed
-
getSession
protected javax.mail.Session getSession() throws Exception
Get Session- Returns:
- Session
- Throws:
Exception
-
getStore
protected javax.mail.Store getStore() throws Exception
Get Store- Returns:
- Store
- Throws:
Exception
-
processInBox
protected int processInBox() throws Exception
Process InBox- Returns:
- number of processed
- Throws:
Exception
-
processMessage
protected int processMessage(javax.mail.Message msg) throws Exception
Process Message- Parameters:
msg
- message- Returns:
- Type of Message
- Throws:
Exception
-
getSubject
protected String getSubject(javax.mail.Message msg)
Get Subject- Parameters:
msg
- message- Returns:
- subject or ""
-
getMessage
protected String getMessage(javax.mail.Part msg)
Get Message- Parameters:
msg
- Message- Returns:
- message or ""
-
getDeliveryReport
protected String getDeliveryReport(javax.mail.Part msg)
Get Delivery Report- Parameters:
msg
- message- Returns:
- delivery info or null
-
getDeliveredReportDetail
protected String getDeliveredReportDetail(javax.mail.Part part) throws Exception
Get Delivered Report Detail- Parameters:
part
- Mime Type message/*- Returns:
- info or null
- Throws:
Exception
-
dumpEnvelope
protected void dumpEnvelope(javax.mail.Message m) throws Exception
Print Envelope- Parameters:
m
- message- Throws:
Exception
-
dumpBody
protected void dumpBody(javax.mail.Part p) throws Exception
Print Body- Parameters:
p
-- Throws:
Exception
-
printOut
protected static void printOut(String s)
Print- Parameters:
s
- string
-
main
public static void main(String[] args)
Main Test- Parameters:
args
- ignored
-
-