Email Control Annotations
This section includes information on Email control annotations.
@jc:email Annotation
Specifies class- and method-level configuration attributes for the Email control.
Syntax
jc:email
[from-address="from-address"]
[from-name="from-name"]
[smtp-address="smtp-address"]
[reply-to-address="reply-to-address"]
[reply-to-name="reply-to-name"]
[smtp-username="smtp-username"]
[smtp-password="smtp-password"]
[smtp-password-alias="smtp-password-alias"]
[header-encoding="header-encoding"]
jc:send-email
[to="To-recipients"]
[cc="CC-recipients"]
[bcc="BCC-recipients"]
[subject="subject"]
[body="body"]
[content-type="content-type"]
[attachments="file-list"]
Attributes
These attributes determine the default behavior of the Email control. The Email control may be configured during its lifetime by calling methods of the EmailControl class.
from-address
A string containing the originating e-mail address. This attribute is required if the from-name attribute is present.
from-name
A string containing the display name for the originating e-mail address. This attribute is optional.
smtp-address
A string containing the address of the SMTP server in host:port or host form. If the port is not specified, the standard SMTP port of 25 is used. This attribute is required.
reply-to-address
A string containing the e-mail address to reply to. This attribute is required if the reply-to-name attribute is present.
reply-to-name
A string containing the display name for the reply-to-address. This attribute is optional.
smtp-username
A string containing the username for server's that require authentication to send. This attribute is optional.
smtp-password
A string containing the associated password. This attribute is optional.
smtp-password-alias
A string containing the password alias. The alias is used to look up the password in the password store. This attribute is optional and is mutually exclusive with the smtp-password attribute.
header-encoding
A string specifying the encoding to be used for the mail headers as specified by from-name, reply-to-name, to, bc, bcc, subject, and attachments. If no header encoding is specified, the system default encoding is used.
Parameter substitution can be used for any of the following method attributes. Substitutions are allowed in the middle of the subject or body. For example, upon receiving an order, you can send the following e-mail:
"Thanks for your order. Your order number is {orderNumber}.
Please reference this number in all your future correspondence."
to
The list of To recipients. This attribute takes a comma separated list of Strings. This attribute is required.
cc
The list of CC recipients. This attribute takes a comma separated list of Strings. This attribute is optional.
bcc
The list of BCC recipients. This attribute takes a comma separated list of Strings. This attribute is optional.
subject
A string containing the subject of the e-mail. This attribute is optional.
body
A string containing the body of the e-mail. This attribute is optional.
content-type
A string containing the content-type of the body. If not specified, the default is text/plain for String bodies and text/xml for XmlObject bodies. Aside from the default text/plain, expected content types include text/html, text/xml, and application/xml. This attribute is optional.
attachments
The list of files to send as attachments. This attribute takes a comma separated list of Strings. This attribute is optional.
Unqualified paths specifying attachment locations are relative to the location of the domain's startWeblogic command file. Because the domain root may be deep in the directory structure, we recommend the use of absolute paths for specifying attachment locations.
The to and cc recipient lists can include display names as shown in the following examples:
Joe User <joe.user@myorg.com>, Jane User <jane.user@myorg.com>
"Joe A. User" <joe.user@myorg.com>, "Jane B. User" <jane.user@myorg.com>
Related Topics
Email Control Interface
Email Control