6 Star 7 Fork 3

Rory Ye / mail-settings-detector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 851 Bytes
一键复制 编辑 原始数据 按行查看 历史
Rory Ye 提交于 2014-07-23 11:07 . change the README.md, add maven config.

A utility library detect mail server settings by a email address.

Usage

Add denpendency in maven :

<dependency>
	<groupId>com.homolo</groupId>
	<artifactId>mail-settings-detector</artifactId>
	<version>1.0.0</version>
</dependency>

Then you can get the settings:

MailSettings settings = MailSettingDetector.getInstance().detect("tsc@homolo.com");
String smtpHost = settings.getSmtpServer().getHost();
int smtpPort = settings.getSmtpServer().getPort();
boolean smtpSsl = settings.getSmtpServer().isSsl();

String imapHost = settings.getImapServer().getHost();
int imapPort = settings.getImapServer().getPort();
boolean imapSsl = settings.getImapServer().isSsl();

String popHost = settings.getPopServer().getHost();
int popPort = settings.getPopServer().getPort();
boolean popPort = settings.getPopServer().isSsl();
Java
1
https://gitee.com/rory-cn/mail-settings-detector.git
git@gitee.com:rory-cn/mail-settings-detector.git
rory-cn
mail-settings-detector
mail-settings-detector
master

搜索帮助