本文来自:高爽|Coder,原文地址:http://blog.csdn.net/ghsau/article/details/17839983,#javamail-1.4.5-oth-JPR
JavaMail spec:http://www.Oracle.com/technetwork/java/javamail-1-149769.pdf
JAF:http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#jaf-1.1.1-fcs-oth-JPR
JavaMail下载好后,我们来看一下其主要内容:
[plain] view plain copy print?Name | Type | Description |
---|---|---|
mail.debug | boolean | The initial debug mode. Default is false. |
mail.from | String | The return email address of the current user, used by the InternetAddress methodgetLocalAddress . |
mail.mime.address.strict | boolean | The MimeMessage class uses the InternetAddress method parseHeader to parse headers in messages. This property controls the strict flag passed to theparseHeader method. The default is true. |
mail.host | String | The default host name of the mail server for both Stores and Transports. Used if themail.protocol.host property isn't set. |
mail.store.protocol | String | Specifies the default message access protocol. The Session methodgetStore() returns a Store object that implements this protocol. By default the first Store provider in the configuration files is returned. |
mail.transport.protocol | String | Specifies the default message transport protocol. The Session methodgetTransport() returns a Transport object that implements this protocol. By default the first Transport provider in the configuration files is returned. |
mail.user | String | The default user name to use when connecting to the mail server. Used if the mail.protocol.user property isn't set. |
mail.protocol.class | String | Specifies the fully qualified class name of the provider for the specified protocol. Used in cases where more than one provider for a given protocol exists; this property can be used to specify which provider to use by default. The provider must still be listed in a configuration file. |
mail.protocol.host | String | The host name of the mail server for the specified protocol. Overrides the mail.host property. |
mail.protocol.port | int | The port number of the mail server for the specified protocol. If not specified the protocol's default port number is used. |
mail.protocol.user | String | The user name to use when connecting to mail servers using the specified protocol. Overrides themail.user property. |
更新于2014.01.06 文中示例以及以后的示例中所用的邮箱账户均为在163申请的测试账户,分别为java_mail_001至java_mail_004,密码均为javamail。 本文来自:高爽|Coder,原文地址:http://blog.csdn.net/ghsau/article/details/17839983,转载请注明。
新闻热点
疑难解答