www.element4solution.com

e4s.mail
Interface AEP_ReceiveMail


public interface AEP_ReceiveMail

Application exit point for receiving mails including a notification mechanism.


Method Summary
 E4ApplObj_Intf getApplObj()
           
 java.lang.String[] getFilterFrom()
          Get an array of email addresses that a message can be sent from unless the message will not forwarded to receiveAndDelete(String[], String, String, Date, String, File[]).
 java.lang.String[] getFilterSubject()
          Get an array of strings that must be included in the subject of a mail message unless the message will not forwarded to receiveAndDelete(String[], String, String, Date, String, File[]).
 java.io.PrintWriter getLogFile()
          Get an valid, opened logfile.
 java.lang.String getMailboxPassword()
          Specify the mailbox user's password.
 java.lang.String getMailboxServer()
          Specify the mailbox server.
 java.lang.String getMailboxUser()
          Specify the mailbox user account.
 java.lang.String getTempPath()
          Specify a temporary path where the files shall be stored
 boolean receiveAndDelete(java.lang.String[] recipient, java.lang.String sender, java.lang.String subject, java.util.Date sent, java.lang.String msgbody, java.io.File[] attachments)
          Receive an email (the mail is completly downloaded from the server but not deleted).
 

Method Detail

receiveAndDelete

boolean receiveAndDelete(java.lang.String[] recipient,
                         java.lang.String sender,
                         java.lang.String subject,
                         java.util.Date sent,
                         java.lang.String msgbody,
                         java.io.File[] attachments)
Receive an email (the mail is completly downloaded from the server but not deleted).

Parameters:
recipient - email address(es) of email recipients
sender - email address of the sender
subject - email subject
sent - date, email has been sent
msgbody - the message body (content)
attachments - an array of files that have been downloaded and stored in the temporary directory specified by getTempPath().
Returns:
true, if the message shall be deleted from the mailserver or false if the mail shall remain on the server
See Also:
getTempPath(), getFilterFrom(), getFilterSubject()

getLogFile

java.io.PrintWriter getLogFile()
Get an valid, opened logfile.

Returns:
null if no logfile is required, or the logfile writer

getMailboxServer

java.lang.String getMailboxServer()
Specify the mailbox server.

Returns:
e.g. "mail.yourhost.com"
See Also:
getMailboxUser(), getMailboxPassword()

getMailboxUser

java.lang.String getMailboxUser()
Specify the mailbox user account.

Returns:
e.g. "myfirstname.mylastname"
See Also:
getMailboxServer(), getMailboxPassword()

getMailboxPassword

java.lang.String getMailboxPassword()
Specify the mailbox user's password.

Returns:
the password required for login
See Also:
getMailboxServer(), getMailboxUser()

getFilterSubject

java.lang.String[] getFilterSubject()
Get an array of strings that must be included in the subject of a mail message unless the message will not forwarded to receiveAndDelete(String[], String, String, Date, String, File[]).

Returns:
null if no filter is passed or an array that is treatened as OR-conjunction
See Also:
getFilterFrom()

getFilterFrom

java.lang.String[] getFilterFrom()
Get an array of email addresses that a message can be sent from unless the message will not forwarded to receiveAndDelete(String[], String, String, Date, String, File[]).

Returns:
null if any sender's address is valid or an array that is treatened as OR-conjunction
See Also:
getFilterSubject()

getTempPath

java.lang.String getTempPath()
Specify a temporary path where the files shall be stored

Returns:
the temporary path (null, if a system path shall be used)

getApplObj

E4ApplObj_Intf getApplObj()

www.element4solution.com