|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jfw.mail.SendEmailThread
public final class SendEmailThread
Used for send an email.
For asynchronously send use method send()
.
For synchronously send use method run()
.
Example
SendEmailThread sendEmailThread = new SendEmailThread(...);
sendEmailThread.send();
Constructor Summary | |
---|---|
SendEmailThread(java.lang.String host,
java.lang.String username,
java.lang.String password,
java.lang.String from,
java.util.ArrayList to,
java.util.ArrayList cc,
java.util.ArrayList bcc,
java.lang.String object,
java.lang.String text,
java.lang.String subcontentType,
java.lang.String charsetEncoding,
java.lang.String port,
boolean isSecure,
boolean isDebug)
Create a new instance. |
Method Summary | |
---|---|
void |
run()
Use this methiod directly for send the email synchronously. |
void |
send()
Create a new thread and use it for send the mail. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SendEmailThread(java.lang.String host, java.lang.String username, java.lang.String password, java.lang.String from, java.util.ArrayList to, java.util.ArrayList cc, java.util.ArrayList bcc, java.lang.String object, java.lang.String text, java.lang.String subcontentType, java.lang.String charsetEncoding, java.lang.String port, boolean isSecure, boolean isDebug) throws java.lang.Exception
from
- mail address of sender.username
- username. If null mail server authentication
parameters will not be set.password
- password. If null mail server authentication
parameters will not be set.to
- mail addresses of receivers.cc
- mail addresses of Cc.bcc
- mail addresses of Bcc.object
- mail object.text
- mail text.subcontentType
- content type of mail.charsetEncoding
- charset encoding to use.port
- the port of the mail server.isSecure
- set email secure mode (SSL).isDebug
- set email send debug mode.
java.lang.Exception
Method Detail |
---|
public void send()
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |