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.


Variable Index

 o APPLICATION
Content (primary) type Application.
 o ATTACHMENT
Content disposition ATTACHMENT
 o AUDIO
Content (primary) type Audio.
 o BASE64
Base64 Transfer Encoding.
 o IMAGE
Content (primary) type Image.
 o INLINE
Content disposition INLINE
 o NONE
No Transfer Encoding.
 o QP
Quoted Printable Transfer Encoding.
 o TEXT
Content (primary) type Text.
 o VIDEO
Content (primary) type Video.

Constructor Index

 o IMTransport()

Method Index

 o sendDocuments(String, String, String, String, String[], String[], IMAttachment[], boolean)
Builds a MIME message with the specified parameters.
 o sendMessage(String, String, String, InputStream)
Connects to the SMTP transport at the specified host and submits the message.

Variables

 o TEXT
 public static final int TEXT
Content (primary) type Text.

 o AUDIO
 public static final int AUDIO
Content (primary) type Audio.

 o IMAGE
 public static final int IMAGE
Content (primary) type Image.

 o VIDEO
 public static final int VIDEO
Content (primary) type Video.

 o APPLICATION
 public static final int APPLICATION
Content (primary) type Application.

 o BASE64
 public static final int BASE64
Base64 Transfer Encoding.

 o QP
 public static final int QP
Quoted Printable Transfer Encoding.

 o NONE
 public static final int NONE
No Transfer Encoding.

 o INLINE
 public static final int INLINE
Content disposition INLINE

 o ATTACHMENT
 public static final int ATTACHMENT
Content disposition ATTACHMENT

Constructors

 o IMTransport
 public IMTransport()

Methods

 o 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
 o 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