All Packages Class Hierarchy This Package Previous Next Index
Class netscape.messaging.convenience.IMTransport
java.lang.Object
|
+----netscape.messaging.convenience.IMTransport
- public class IMTransport
- extends Object
The IMTransport class implements Java Convenience APIs.
This class provides a convenient interface for building,
encoding, and sending messages. It combines the functionality
of MIME and SMTP.
-
APPLICATION
- Content (primary) type Application.
-
ATTACHMENT
- Content disposition ATTACHMENT
-
AUDIO
- Content (primary) type Audio.
-
BASE64
- Base64 Transfer Encoding.
-
IMAGE
- Content (primary) type Image.
-
INLINE
- Content disposition INLINE
-
NONE
- No Transfer Encoding.
-
QP
- Quoted Printable Transfer Encoding.
-
TEXT
- Content (primary) type Text.
-
VIDEO
- Content (primary) type Video.
-
IMTransport()
-
-
sendDocuments(String, String, String, String, String[], String[], IMAttachment[], boolean)
- Builds a MIME message with the specified parameters.
-
sendMessage(String, String, String, InputStream)
- Connects to the SMTP transport at the specified host and submits the message.
TEXT
public static final int TEXT
- Content (primary) type Text.
AUDIO
public static final int AUDIO
- Content (primary) type Audio.
IMAGE
public static final int IMAGE
- Content (primary) type Image.
VIDEO
public static final int VIDEO
- Content (primary) type Video.
APPLICATION
public static final int APPLICATION
- Content (primary) type Application.
BASE64
public static final int BASE64
- Base64 Transfer Encoding.
QP
public static final int QP
- Quoted Printable Transfer Encoding.
NONE
public static final int NONE
- No Transfer Encoding.
INLINE
public static final int INLINE
- Content disposition INLINE
ATTACHMENT
public static final int ATTACHMENT
- Content disposition ATTACHMENT
IMTransport
public IMTransport()
sendMessage
public static String[] sendMessage(String host,
String sender,
String recipients,
InputStream MIMEMessageStream) throws IMException
- Connects to the SMTP transport at the specified host and submits the message.
NOTE: The MIME Message itself can be created using the Netscape MIME API or
by any other means.
- Parameters:
- host - Name of the host to connect to.
- sender - Sender of the message.
- recipients - Email addresses of the recipients of the message, separated by commas or spaces.
- MIMEMessageStream - Input-Stream to the message in MIME canonical form.
- Returns:
- List of recipients to whom the message could not be submitted.
- Throws: IMException
- If the message could not be sent due to invalid host
or other causes.
- See Also:
- sendDocuments
sendDocuments
public static String[] sendDocuments(String host,
String sender,
String recipients,
String subject,
String msgHeaderNames[],
String msgHeaderValues[],
IMAttachment attachments[],
boolean fUseTempFiles) throws IMException
- Builds a MIME message with the specified parameters. Connects to the SMTP transport
at the specified host and submits the message. If the message has more than one
attachment, it is sent as MIME multipart/mixed type message.
NOTE: This method facilitates mailing documents by mail-enabling an otherwise
mail-ignorant application. For any other uses or more sophisticated needs,
use the sendMessage() method in association with the Netscape MIME API
or the other Messaging APIs provided by Netscape.
NOTE: If the fUseTempFiles parameter is set to true, sendDocuments uses
temporary intermediate files for some internal processing. This mode provides better
performance. If temporary files should not be created, set this flag to false.
- Parameters:
- host - Name of the host to connect to.
- sender - Sender of the message.
- recipients - Email addresses of the recipients of the message, separated by commas or spaces.
- subject - Subject of the Message. Can be null.
- msgHeaderNames - Additional RFC-822 header names.
- msgHeaderValues - Values corresponding to the headers in the msgHeaderNames parameter.
- fUseTempFiles - Whether to use temporary intermediate files for some
internal processing. Values:
- true: use temp files (better performance).
- false: do not use temp files.
- fUseTempFiles - If true, uses temporary intermediate files (for better performance).
- Returns:
- List of recipients to whom the message could not be submitted.
- Throws: IMException
- If the message could not be sent due to invalid host or other
causes, or if there are inconsistencies in the parameter specifications.
All Packages Class Hierarchy This Package Previous Next Index