SK.gnome.dwarf.mail.smtp.proc
Interface MailAgentMessage

All Known Implementing Classes:
SMTPMessage

public interface MailAgentMessage

Provides an interface for queued mail messages.

It provides access to the SMTP envelope information as well as the message content, but no message recipients, since they are passed to the mail agents via an extra collection.


Method Summary
 boolean get8bitMIME()
          Returns the 8BITMIME SMTP parameter.
 java.lang.String getAuth()
          Returns the AUTH SMTP parameter.
 java.net.InetAddress getClientAddress()
          Returns the SMTP client address.
 java.lang.String getClientDomain()
          Returns the domain name of the SMTP client as provided in the HELO/EHLO command.
 long getCurrentDeliveryDelay(Recipient recipient)
          Returns the current delivery delay for the given recipient.
 java.lang.String getDate()
          Returns the internal message time formatted as per RFC 822.
 boolean getDeliverBy()
          Returns the DELIVERBY SMTP parameter.
 char getDeliverByMode()
          Returns the BYTIME SMTP parameter.
 int getDeliverByTime()
          Returns the BYTIME SMTP parameter.
 boolean getDeliverByTrace()
          Returns the BYTRACE SMTP parameter.
 java.lang.String getDSNEnvid()
          Returns the DSNENVID SMTP parameter.
 java.lang.String getDSNRet()
          Returns the DSNRET SMTP parameter.
 java.lang.String getFrom()
          Returns the SMTP reverse-path value.
 java.io.InputStream getInputStream()
          Returns the message content.
 long getMessageSize()
          Returns the message size.
 MimePart getMimePart()
          Returns a parsed MIME interpretation of the message.
 java.lang.String getProtocol()
          Returns the submission protocol.
 java.net.InetAddress getServerAddress()
          Returns the local SMTP server's address.
 java.lang.String getSMTPid()
          Returns the SMTP identification string.
 long getTime()
          Returns the internal message time.
 

Method Detail

getTime

public long getTime()
Returns the internal message time.

Returns the system time in the moment the message was created.

Returns:
the message time

getDate

public java.lang.String getDate()
Returns the internal message time formatted as per RFC 822.

Returns the system time in the moment the message was created.

Returns:
the message time

getSMTPid

public java.lang.String getSMTPid()
Returns the SMTP identification string.

Each message instance has a unique identification string.

Returns:
the id string

getProtocol

public java.lang.String getProtocol()
Returns the submission protocol.

One of the "LMTP", "SMTP", "ESMTP" or "LOCAL" values may be returned.

Returns:
the protocol string

getClientDomain

public java.lang.String getClientDomain()
Returns the domain name of the SMTP client as provided in the HELO/EHLO command.

Returns:
the client's domain name

getClientAddress

public java.net.InetAddress getClientAddress()
Returns the SMTP client address.

Returns:
the client address

getServerAddress

public java.net.InetAddress getServerAddress()
Returns the local SMTP server's address.

Returns:
the server address

getFrom

public java.lang.String getFrom()
Returns the SMTP reverse-path value.

Returns:
the RFC 822 address

get8bitMIME

public boolean get8bitMIME()
Returns the 8BITMIME SMTP parameter.

Returns:
whether the 8BITMIME parameter is set

getAuth

public java.lang.String getAuth()
Returns the AUTH SMTP parameter.

Returns:
the AUTH parameter value or null if it was not issued by the client

getDSNRet

public java.lang.String getDSNRet()
Returns the DSNRET SMTP parameter.

Returns:
the parameter value

getDSNEnvid

public java.lang.String getDSNEnvid()
Returns the DSNENVID SMTP parameter.

Returns:
the parameter value

getDeliverBy

public boolean getDeliverBy()
Returns the DELIVERBY SMTP parameter.

Returns:
the parameter value

getDeliverByTime

public int getDeliverByTime()
Returns the BYTIME SMTP parameter.

Returns:
the parameter value

getDeliverByMode

public char getDeliverByMode()
Returns the BYTIME SMTP parameter.

Returns:
the parameter value

getDeliverByTrace

public boolean getDeliverByTrace()
Returns the BYTRACE SMTP parameter.

Returns:
the parameter value

getCurrentDeliveryDelay

public long getCurrentDeliveryDelay(Recipient recipient)
Returns the current delivery delay for the given recipient.

Parameters:
recipient - the recipient
Returns:
the delay in milliseconds

getMessageSize

public long getMessageSize()
Returns the message size.

This is the exact size of the whole unparsed message, including the header.

Returns:
the message size

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns the message content.

Returns the whole unparsed message octets, including the header.

Returns:
the message content
Throws:
java.io.IOException - if an I/O error occured

getMimePart

public MimePart getMimePart()
                     throws MailException
Returns a parsed MIME interpretation of the message.

Returns:
the MIME view of the message
Throws:
MailException - if an error occured


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.