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 Details

    • 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:
    • REQUEST

      protected static final int REQUEST
      Process Request
      See Also:
    • WORKFLOW

      protected static final int WORKFLOW
      Process Workflow
      See Also:
    • DELIVERY

      protected static final int DELIVERY
      Process Delivery Confirm
      See Also:
  • Constructor Details

    • EMailProcessor

      public EMailProcessor(MClient client)
      EMail Processor
      Parameters:
      client - client
    • EMailProcessor

      public EMailProcessor(String host, String user, String password)
      EMail Processor
      Parameters:
      host - host
      user - user id
      password - password
  • Method Details

    • 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