A good source of inspiration is Thunderbird with their autoconfig:
All the lookup mechanisms use the email address domain as base for the lookup. For example, for the email address email@example.com , the lookup is performed as (in this order):
- tb-install-dir/isp/example.com.xml on the harddisk
- check for autoconfig.example.com
- look up of "example.com" in the ISPDB
- look up "MX example.com" in DNS, and for mx1.mail.hoster.com, look up "hoster.com" in the ISPDB
- try to guess (imap.example.com, smtp.example.com etc.)
Dust-Mail already implement good things related to discovery and could be use as a source of inspiration.
sender = "smtp" shouldn't make host/post mandatory, these can be auto-discovered with the email address using DNS:
AccountConfig. This should be done in the lib so it can be used by interfaces. (~2d)
This feature could be a great addition, and it would indeed prevent us to mark host and port as required fields. Thank you for the idea!
I think you can basically copy the implementation that I wrote for caldav and just replace the