Search code examples
javaemailjakarta-mail

How to get mail hostname, protocol, ports and encrypt method by an email address without a list?


I have a mail system use for login to user's mail box to send or receive mails. But there are so many mail services uses different protocol, hostname, ports and encrypt method. Is there any better way to get those information without a list, just like Thunderbird and Apple Mail?


Solution

  • Many email hosting sites support auto discovering of those settings.

    Have a look at Mozilla Autoconfiguration (which also explains alternative ways like getting the settings from ISPDB, manual guessing, ..) and Microsoft Autodiscover