Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine POP/IMAP server from email address

Is there a way to determine POP or IMAP server given the email address? I am building an application for non-technical users and I dont really want to bother them with asking their IMAP/POP servers. mail2web.com does this, but I am not sure how.

like image 710
raghu Avatar asked Jan 22 '10 07:01

raghu


2 Answers

This is how Thunderbird does it

/**
18  * Try to guess the config, by:
19  * - guessing hostnames (pop3.<domain>, pop.<domain>, imap.<domain>,
20  *                       mail.<domain> etc.)
21  * - probing known ports (for IMAP, POP3 etc., with SSL, STARTTLS etc.)
22  * - opening a connection via the right protocol and checking the
23  *   protocol-specific CAPABILITIES like that the server returns.
24  */

http://mxr.mozilla.org/comm-central/source/mailnews/base/prefs/content/accountcreation/guessConfig.js

like image 126
Midhat Avatar answered Sep 22 '22 21:09

Midhat


Thunderbird 3 does it too.. I'd take a look at the source code.
I think it's just a lookup table though..

like image 20
Joril Avatar answered Sep 24 '22 21:09

Joril