Package org.compiere.util
Interface EmailSrv.ProcessEmailHandle
- All Known Implementing Classes:
RequestEMailProcessor
- Enclosing class:
- EmailSrv
public static interface EmailSrv.ProcessEmailHandle
This class inject to email reading process (
EmailSrv.processMessage(Message, ProcessEmailHandle, Store, Folder)
)- Author:
- hieplq
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkEmailHeader
(EmailSrv.EmailContent emailHeader, javax.mail.Message emailRaw) after read header of email (from, subject, message_id,...), will call this function to evaluate will continue process or cancel this email at this time, in EmailInfo just has header info, content and attach is not manipulateList<javax.mail.Folder>
List all folder use when process message this function make handle close folder and close session can reopen it.void
processEmailContent
(EmailSrv.EmailContent emailContent, javax.mail.Message emailRaw, javax.mail.Store mailStore, javax.mail.Folder mailFolder) main where to process email. this time, every email info is manipulate to emailContentvoid
processEmailError
(EmailSrv.EmailContent emailHeader, javax.mail.Message emailRaw, javax.mail.Store mailStore, javax.mail.Folder mailFolder) when read email for process, after some time try when has error, will call this function to ensure this email is can't process
-
Method Details
-
checkEmailHeader
boolean checkEmailHeader(EmailSrv.EmailContent emailHeader, javax.mail.Message emailRaw) throws javax.mail.MessagingException after read header of email (from, subject, message_id,...), will call this function to evaluate will continue process or cancel this email at this time, in EmailInfo just has header info, content and attach is not manipulate- Parameters:
emailHeader
-emailRaw
-- Returns:
- Throws:
javax.mail.MessagingException
-
processEmailError
void processEmailError(EmailSrv.EmailContent emailHeader, javax.mail.Message emailRaw, javax.mail.Store mailStore, javax.mail.Folder mailFolder) throws javax.mail.MessagingException when read email for process, after some time try when has error, will call this function to ensure this email is can't process- Parameters:
emailHeader
-emailRaw
-mailStore
-mailFolder
-- Throws:
javax.mail.MessagingException
-
processEmailContent
void processEmailContent(EmailSrv.EmailContent emailContent, javax.mail.Message emailRaw, javax.mail.Store mailStore, javax.mail.Folder mailFolder) throws javax.mail.MessagingException, IOException main where to process email. this time, every email info is manipulate to emailContent- Parameters:
emailContent
-emailRaw
-mailStore
-mailFolder
-- Throws:
javax.mail.MessagingException
IOException
-
getListFolder
List<javax.mail.Folder> getListFolder()List all folder use when process message this function make handle close folder and close session can reopen it.- Returns:
-