Environment Properties in JavaMail

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.


PropertyDescriptionDefault Value
mail.store.protocolSpecifies 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.protocolSpecifies 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.hostSpecifies 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.userSpecifies 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.hostSpecifies the protocol-specific default Mail server. This overrides the mail.host property.mail.host
mail.protocol.userSpecifies the protocol-specific default username for connecting to the Mail server. This overrides the mail.user propertymail.user
mail.fromSpecifies the return address of the current user. Used by the InternetAddress.getLocalAddress method to specify the current user’s email address.username@host
mail.debugSpecifies 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

Ref:http://download.csdn.net/detail/love_legain/9783373

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值