kom.gateway
Class GetMail.MessageDelivery

java.lang.Object
  |
  +--kom.gateway.GetMail.MessageDelivery
Enclosing class:
GetMail

class GetMail.MessageDelivery
extends java.lang.Object

Methods for delivering a message to one or more recipients in the database


Field Summary
 javax.mail.internet.MimeMessage currentMessage
          Current message in parsed format
(package private)  boolean duplicate
          True if message was determined to exist already (a duplicate)
 java.lang.String errorMessage
          Delivery error message
 java.io.File headerFile
          Current message header file in spool
 java.lang.String headerFileName
          Path of message header file in spool
 java.io.File mailFile
          Current mail text file
 java.lang.String mailFilePath
          Current mail spool file path
 java.lang.String mailFrom
          MAIL FROM value from SMTP header
 java.io.File mailSpoolFile
          Current mail spool file
 java.util.Vector mailTo
          RCPT TO values from SMTP header
 java.lang.String mailURL
          Current mail file url
 int numberOfRecipients
          Number of local recipients
 java.util.Vector recipients
          RCPT TO values from SMTP header corresponding to local recipients
 
Constructor Summary
GetMail.MessageDelivery(java.lang.String fn)
          Constructor
 
Method Summary
 void error(java.lang.String msg)
           
 void existingMessage(java.lang.String rId)
          Removes spool file for existing message
 int getRecipients()
          Finds local recipients from envelope data
 java.io.File getSpool()
          Defines mailSpoolFile
 boolean moveSpool(java.lang.String rId)
          Moves message text from spool area to mail directory
 void removeSpool()
          Removes header file from spool area
 void saveHdr()
          Copies (renames) header data to mail message directory
 void setup(java.io.FileInputStream f)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

mailFilePath

public java.lang.String mailFilePath
Current mail spool file path

mailFrom

public java.lang.String mailFrom
MAIL FROM value from SMTP header

mailSpoolFile

public java.io.File mailSpoolFile
Current mail spool file

mailFile

public java.io.File mailFile
Current mail text file

headerFileName

public java.lang.String headerFileName
Path of message header file in spool

headerFile

public java.io.File headerFile
Current message header file in spool

mailURL

public java.lang.String mailURL
Current mail file url

mailTo

public java.util.Vector mailTo
RCPT TO values from SMTP header

recipients

public java.util.Vector recipients
RCPT TO values from SMTP header corresponding to local recipients

numberOfRecipients

public int numberOfRecipients
Number of local recipients

currentMessage

public javax.mail.internet.MimeMessage currentMessage
Current message in parsed format

errorMessage

public java.lang.String errorMessage
Delivery error message

duplicate

boolean duplicate
True if message was determined to exist already (a duplicate)
Constructor Detail

GetMail.MessageDelivery

public GetMail.MessageDelivery(java.lang.String fn)
Constructor
Parameters:
fn - Name of file containing envelope header data
Method Detail

existingMessage

public void existingMessage(java.lang.String rId)
Removes spool file for existing message
Parameters:
rId - Id of existing message

getSpool

public java.io.File getSpool()
Defines mailSpoolFile
Returns:
File if it exists, otherwise null

saveHdr

public void saveHdr()
Copies (renames) header data to mail message directory

moveSpool

public boolean moveSpool(java.lang.String rId)
Moves message text from spool area to mail directory
Parameters:
rId - Message id in CDB: "/mail/NNN/"
Returns:
true on success

removeSpool

public void removeSpool()
Removes header file from spool area

getRecipients

public int getRecipients()
Finds local recipients from envelope data
Returns:
Number of valid recipients found and placed in recipients, number also placed in numberOfRecipients.

error

public void error(java.lang.String msg)

setup

public void setup(java.io.FileInputStream f)