Package jakarta.mail
Annotation Interface MailSessionDefinition
@Target(TYPE)
@Retention(RUNTIME)
@Repeatable(MailSessionDefinitions.class)
public @interface MailSessionDefinition
Annotation used by Jakarta EE applications to define a
MailSession
to be registered with JNDI. The MailSession
may be configured
by setting the annotation elements for commonly used Session
properties. Additional standard and vendor-specific properties may be
specified using the properties
element.
The session will be registered under the name specified in the
name
element. It may be defined to be in any valid
Jakarta EE
namespace, and will determine the accessibility of
the session from other components.
- Since:
- JavaMail 1.5
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionDescription of this mail session.From address for the user.Host name for the mail server.Password to use for authentication.String[]
Properties to include in the Session.Store protocol name.Transport protocol name.User name to use for authentication.
-
Element Details
-
description
String descriptionDescription of this mail session.- Returns:
- the description
- Default:
""
-
name
String nameJNDI name by which the mail session will be registered.- Returns:
- the JNDI name
-
storeProtocol
String storeProtocolStore protocol name.- Returns:
- the store protocol name
- Default:
""
-
transportProtocol
String transportProtocolTransport protocol name.- Returns:
- the transport protocol name
- Default:
""
-
host
String hostHost name for the mail server.- Returns:
- the host name
- Default:
""
-
user
String userUser name to use for authentication.- Returns:
- the user name
- Default:
""
-
password
String passwordPassword to use for authentication.- Returns:
- the password
- Default:
""
-
from
String fromFrom address for the user.- Returns:
- the from address
- Default:
""
-
properties
String[] propertiesProperties to include in the Session. Properties are specified using the format: propertyName=propertyValue with one property per array element.- Returns:
- the properties
- Default:
{}
-