|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.javactionscript.server.ContextualSmtp
public class ContextualSmtp
This resource allows to connect to a SMTP server in order to send e-mails.
It can be configured once for all through ContextFactory.getSmtpProperties() and then used during the command execution through the ServiceContext object.
A ContextualSmtp resource can be obtained from a ServiceContext instance.
Requires that the JavaMail library (mail.jar) and the Java Activation Framework library (activation.jar) are accessible from the web application (WEB-INF/lib)
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CHARSET
The default character set of the body : ISO-8859-1. |
static java.lang.String |
DEFAULT_CONTENT_TRANSFER_ENCODING
The default content transfer encoding that will be defined in the e-mail header : 8bit. |
static java.lang.String |
DEFAULT_CONTENT_TYPE
The default content type that will be defined in the e-mail header : text/plain; charset=UTF-8 |
| Method Summary | |
|---|---|
void |
sendEmail(java.lang.String $body,
java.lang.String $subject,
java.lang.String $from,
java.lang.String[] $to,
java.lang.String[] $cc,
java.lang.String[] $bcc)
Sends an e-mail using DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE and DEFAULT_CONTENT_TRANSFER_ENCODING. |
void |
sendEmail(java.lang.String $body,
java.lang.String $subject,
java.lang.String $from,
java.lang.String[] $to,
java.lang.String[] $cc,
java.lang.String[] $bcc,
java.lang.String $charset,
java.lang.String $contentType,
java.lang.String $contentTransferEncoding)
Sends an e-mail. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_CHARSET
public static final java.lang.String DEFAULT_CONTENT_TYPE
public static final java.lang.String DEFAULT_CONTENT_TRANSFER_ENCODING
| Method Detail |
|---|
public void sendEmail(java.lang.String $body,
java.lang.String $subject,
java.lang.String $from,
java.lang.String[] $to,
java.lang.String[] $cc,
java.lang.String[] $bcc)
throws javax.mail.MessagingException
DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE and DEFAULT_CONTENT_TRANSFER_ENCODING.
$body - The body of the e-mail.$subject - The subject of the e-mail.$from - The source e-mail address.$to - The target e-mail addresses (TO), can be null.$cc - The target e-mail addresses (CC - carbon copy), can be null.$bcc - The target e-mail addresses (BCC - blank carbon copy), can be null.
javax.mail.MessagingException
public void sendEmail(java.lang.String $body,
java.lang.String $subject,
java.lang.String $from,
java.lang.String[] $to,
java.lang.String[] $cc,
java.lang.String[] $bcc,
java.lang.String $charset,
java.lang.String $contentType,
java.lang.String $contentTransferEncoding)
throws javax.mail.MessagingException
$body - The body of the e-mail.$subject - The subject of the e-mail.$from - The source e-mail address.$to - The target e-mail addresses (TO), can be null.$cc - The target e-mail addresses (CC - carbon copy), can be null.$bcc - The target e-mail addresses (BCC - blank carbon copy), can be null.$charset - The character set of the body.$contentType - The content type that will be defined in the e-mail header.$contentTransferEncoding - The content transfer encoding that will be defined in the e-mail header.
javax.mail.MessagingException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||