# JavaMail Session: General Attributes

You see this page of the New File wizard when you are defining a JavaMail Session resource. On this page you specify general and advanced configuration information for a JavaMail Session resource and specify the JNDI name of the resource.

Use this page as follows:

Element | Description
--- | ---
JNDI Name | The JNDI must be unique to the resource. JavaMail Session resources are usually placed withing the `mail` naming subcontext.
Mail Host | The host name is the DNS name of the default mail server. The name must be resolvable to an actual host name.
Default User | Enter the user name to use when connecting to the mail server.
Default Return Address | Enter the email address of the default user, in the form `username@host.domain`.
Advanced Information | Advanced information is optional. It is best to leave the advanced settings at their default values unless the Application Server's mail provider has been reconfigured to use a nondefault store or transport protocol. Note: Setting Debug Enabled to True, enables extra debugging output including a protocol trace, for this mail session. If the JavaMail log level is set to FINE or finer, the debugging output is generated and is included in the system log file. See "Configuring Log Levels" for information about setting the log level.

Once you have created the object in your project, the resource needs to be registered with the server before you can use it. The resource is automatically registered when you deploy your project.

After the resource is registered, the resource appears in the JavaMail Sessions node under the Resources node for the server instance in the Services window.

Related Topics

Developing Applications with NetBeans IDE,

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.