Ok I will think about it...How can I find out if SSL is used? E.g. for smtp first try port 25 if this failed and port 465 works -> use SSL?
ClemensOn Tue, 09 Dec 2008 11:57:58 +0100, Bruno Albuquerque <bga@xxxxxxxxxxxxx> wrote:
Clemens zeidler wrote:I attached a patch which simplify the configuration of an email account. When you setup a email account you normally only know your mail address,your username and your password. What you don't know is the server data. So Icreate a database to provide this information.There is a more generic way to do this that is used by most email clients these days:1 - Obtain user's email address (let's supposed it is bga@xxxxxxxxxxxxx in this example). 2 - Check if the domain has a pop3/imap server running by trying to connect to it. If it fails for both protocols, also try with the prefixes "mail.", "pop.", "pop3." and "imap.". 3 - If there is only one IMAP or POP3 server, ask the user for a password and try to connect to it using th username given in the email. Go to step 5. 4 - If there is both an IMAP and POP3 server running. Either ask the user for which one to use and for his/her password. 5 - If login fails, present the user with a panel where he/she can configure server/protocol/username/password. (Only in very few cases this would happen).6 - Autodetect SMTP options in a similar way. -Bruno