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
FieldsModifier and TypeFieldDescriptionprotected static final intProcess Delivery Confirmprotected static final intProcess Errorprotected static final CLoggerLoggerprotected StringEMail Host Parameterprotected StringPassword Parameterprotected javax.mail.SessionSessionprotected javax.mail.StoreStoreprotected StringEMail User Parameterprotected static final intProcess Requestprotected static final intProcess Workflow -
Constructor Summary
ConstructorsConstructorDescriptionEMailProcessor(String host, String user, String password) EMail ProcessorEMailProcessor(MClient client) EMail Processor -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddumpBody(javax.mail.Part p) Print Bodyprotected voiddumpEnvelope(javax.mail.Message m) Print Envelopeprotected StringgetDeliveredReportDetail(javax.mail.Part part) Get Delivered Report Detailprotected StringgetDeliveryReport(javax.mail.Part msg) Get Delivery Reportprotected StringgetMessage(javax.mail.Part msg) Get Messageprotected javax.mail.SessionGet Sessionprotected javax.mail.StoregetStore()Get Storeprotected StringgetSubject(javax.mail.Message msg) Get Subjectstatic voidMain Testprotected static voidPrintprotected intProcess InBoxprotected intprocessMessage(javax.mail.Message msg) Process MessageintProcess 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
-