Environment Properties
This section lists some of the environment properties that are used by the JavaMail APIs. The JavaMail javadocs contain additional information on properties supported by JavaMail.
Note that Applets can not determine some defaults listed in this Appendix. When writing an applet, you must specify the properties you require.
Property | Description | Default Value |
---|---|---|
mail.store.protocol | Specifies the default Message Access Protocol. The Session.getStore() method returns a Store object that implements this protocol. The client can override this property and explicitly specify the protocol with the Session.getStore(String protocol) method. | The first appropriate protocol in the config files |
mail.transport.protocol | Specifies the default Transport Protocol. The Session.getTransport() method returns a Transport object that implements this protocol. The client can override this property and explicitly specify the protocol by using Session.getTransport(String protocol) method. | The first appropriate protocol in the config files |
mail.host | Specifies the default Mail server. The Store and Transport object’s connect methods use this property, if the protocol-specific host property is absent, to locate the target host. | The local machine |
mail.user | Specifies the username to provide when connecting to a Mail server. The Store and Transport object’s connect methods use this property, if the protocol-specific username property is absent, to obtain the username. | user.name |
mail.protocol.host | Specifies the protocol-specific default Mail server. This overrides the mail.host property. | mail.host |
mail.protocol.user | Specifies the protocol-specific default username for connecting to the Mail server. This overrides the mail.user property | mail.user |
mail.from | Specifies the return address of the current user. Used by the InternetAddress.getLocalAddress method to specify the current user’s email address. | username@host |
mail.debug | Specifies the initial debug mode. Setting this property to true will turn on debug mode, while setting it to false turns debug mode off. Note that the Session.setDebug method also controls the debug mode. | false |