Package org.compiere.server
Class EMailProcessor
java.lang.Object
org.compiere.server.EMailProcessor
Request Mail Processor
- Version:
- $Id: EMailProcessor.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
Process Delivery Confirmprotected static final int
Process Errorprotected static final CLogger
Loggerprotected String
EMail Host Parameterprotected String
Password Parameterprotected javax.mail.Session
Sessionprotected javax.mail.Store
Storeprotected String
EMail User Parameterprotected static final int
Process Requestprotected static final int
Process Workflow -
Constructor Summary
ConstructorDescriptionEMailProcessor
(String host, String user, String password) EMail ProcessorEMailProcessor
(MClient client) EMail Processor -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
Get Sessionprotected javax.mail.Store
getStore()
Get Storeprotected String
getSubject
(javax.mail.Message msg) Get Subjectstatic void
Main Testprotected static void
Printprotected int
Process InBoxprotected int
processMessage
(javax.mail.Message msg) Process Messageint
Process Messages in InBox
-
Field Details
-
m_host
EMail Host Parameter -
m_user
EMail User Parameter -
m_pass
Password Parameter -
m_session
protected javax.mail.Session m_sessionSession -
m_store
protected javax.mail.Store m_storeStore -
log
Logger -
ERROR
protected static final int ERRORProcess Error- See Also:
-
REQUEST
protected static final int REQUESTProcess Request- See Also:
-
WORKFLOW
protected static final int WORKFLOWProcess Workflow- See Also:
-
DELIVERY
protected static final int DELIVERYProcess Delivery Confirm- See Also:
-
-
Constructor Details
-
EMailProcessor
EMail Processor- Parameters:
client
- client
-
EMailProcessor
EMail Processor- Parameters:
host
- hostuser
- user idpassword
- password
-
-
Method Details
-
processMessages
public int processMessages()Process Messages in InBox- Returns:
- number of mails processed
-
getSession
Get Session- Returns:
- Session
- Throws:
Exception
-
getStore
Get Store- Returns:
- Store
- Throws:
Exception
-
processInBox
Process InBox- Returns:
- number of processed
- Throws:
Exception
-
processMessage
Process Message- Parameters:
msg
- message- Returns:
- Type of Message
- Throws:
Exception
-
getSubject
Get Subject- Parameters:
msg
- message- Returns:
- subject or ""
-
getMessage
Get Message- Parameters:
msg
- Message- Returns:
- message or ""
-
getDeliveryReport
Get Delivery Report- Parameters:
msg
- message- Returns:
- delivery info or null
-
getDeliveredReportDetail
Get Delivered Report Detail- Parameters:
part
- Mime Type message/*- Returns:
- info or null
- Throws:
Exception
-
dumpEnvelope
Print Envelope- Parameters:
m
- message- Throws:
Exception
-
dumpBody
Print Body- Parameters:
p
-- Throws:
Exception
-
printOut
Print- Parameters:
s
- string
-
main
Main Test- Parameters:
args
- ignored
-