|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--com.opmath.mail.lite.MailClient
An email client accessible to any Java application.
The com.opmath.mail.lite.MailClient class provides a simple email client. The client
can send email using any named SMPT mail host. The client always logs send activity to the
give PrintStream log.
NOTE 1: This version of com.opmath.mail.lite.MailClient does not support the receiving of
IMAP or POP3 mail. Future versions might.
NOTE 2: The com.opmath.mail.lite package requires at least JavaMail 1.1.3 and the Java
Activation Framework (JAF) 1.0.1.
Copyright: (c) 2003 The Open Math Company Limited
The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.
| Fields inherited from class java.lang.Thread |
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals |
| Constructor Summary | |
MailClient(String server,
String from,
String fromName,
PrintStream log)
Constructs an MailClient instance with a given client 'identity'. |
|
MailClient(String server,
String from,
String fromName,
String filePath,
PrintStream log)
Constructs an MailClient instance with a given client 'identity'. |
|
| Method Summary | |
MailMessage |
send(String subject,
String to,
String cc,
String bcc,
String text)
Sends an email message. |
MailMessage |
send(String subject,
String to,
String cc,
String bcc,
String text,
String fileName,
String mimeType)
Sends an email message. |
String |
toString()
Returns a String describing the queue. |
| Methods inherited from class java.lang.Thread |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MailClient(String server,
String from,
String fromName,
PrintStream log)
throws javax.mail.MessagingException
MailClient instance with a given client 'identity'. The identity is in the
form of a 'From:' email address and 'From:' personal name. The local file path for attachments
is set as the local directory.from - the String carrying the 'From:' address.fromName - the String carrying the 'From:' personal name.log - the PrintStream for the activity log.javax.mail.MessagingException - If the from address was not well-formed.
public MailClient(String server,
String from,
String fromName,
String filePath,
PrintStream log)
throws javax.mail.MessagingException
MailClient instance with a given client 'identity'. The identity is in the
form of a 'From:' email address and 'From:' personal name. The local file path for attachments
is set according to the parameter filePath.from - the String carrying the 'From:' address.fromName - the String carrying the 'From:' personal name.fromName - the String carrying the file path (with trailing '/').log - the PrintStream for the activity log.javax.mail.MessagingException - If the from address was not well-formed.| Method Detail |
public MailMessage send(String subject,
String to,
String cc,
String bcc,
String text,
String fileName,
String mimeType)
throws javax.mail.MessagingException
There are only three obligatory parameters for this send(..) method:
to - There must always be at least one 'To:' address for the message.
fileName - The file to be attached to the email message.
mimeType - The MIME type of the attached file.
Where a paremeter value is not required, it may be given as null.
subject - a String subject text, or null.to - a String list of email addresses.cc - a String list of email addresses, or null.bcc - a String list of email addresses, or null.text - a String ascii plain text message, or null.fileName - a String name for one attachment file.mimeType - a String MIME type identifier, for the attachment.MailMessage constructed as part of the queueing operation.javax.mail.MessagingException - If the email message could not be sent.
public MailMessage send(String subject,
String to,
String cc,
String bcc,
String text)
throws javax.mail.MessagingException
There is only one obligatory parameter for this queue(..) method:
to - There must always be at least one 'To:' address for the message.
Where a paremeter value is not required, it may be given as null.
subject - a String subject text, or null.to - a String list of email addresses.cc - a String list of email addresses, or null.bcc - a String list of email addresses, or null.text - a String ascii plain text message, or null.MailMessage constructed as part of the queueing operation.javax.mail.MessagingException - If the email message could not be sent.public String toString()
String describing the queue.
toString in class ThreadString reporting the state of this MailClient.
|
OpMath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||