@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
-
name
-
storeProtocol
-
transportProtocol
-
host
-
user
-
password
-
from
-
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:
{}
-