# mail-settings-detector **Repository Path**: rory-cn/mail-settings-detector ## Basic Information - **Project Name**: mail-settings-detector - **Description**: 自动检测邮件设置的工具包 - **Primary Language**: Java - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 3 - **Created**: 2014-07-15 - **Last Updated**: 2021-05-25 ## Categories & Tags **Categories**: web-dev-toolkits **Tags**: None ## README # A utility library detect mail server settings by a email address. ## Usage Add denpendency in maven : com.homolo mail-settings-detector 1.0.0 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();