2 * Copyright 2007-2011, Haiku, Inc. All rights reserved.
3 * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
4 * Distributed under the terms of the MIT License.
14 #define INFO_DIR "Mail/ProviderInfo"
16 #define ATTR_NAME_POPSERVER "POP Server"
17 #define ATTR_NAME_IMAPSERVER "IMAP Server"
18 #define ATTR_NAME_SMTPSERVER "SMTP Server"
19 #define ATTR_NAME_AUTHPOP "POP Authentication"
20 #define ATTR_NAME_AUTHSMTP "SMTP Authentication"
21 #define ATTR_NAME_POPSSL "POP SSL"
22 #define ATTR_NAME_IMAPSSL "IMAP SSL"
23 #define ATTR_NAME_SMTPSSL "SMTP SSL"
24 #define ATTR_NAME_USERNAME "Username Pattern"
38 0 username is the email address (default)
39 1 username is the local-part of the email address local-part@domain.net
40 2 no username is proposed
53 int32 authentification_pop
;
54 int32 authentification_smtp
;
60 int32 username_pattern
;
67 status_t
GetInfoFromMailAddress(const char* email
,
71 void PrintProviderInfo(provider_info
* pInfo
);
74 status_t
GetMXRecord(const char* provider
, provider_info
*info
);
75 status_t
GuessServerName(const char* provider
,
78 BString
ExtractProvider(const char* email
);
79 status_t
LoadProviderInfo(const BString
&provider
, provider_info
* info
);
80 bool ReadProviderInfo(BNode
*node
, provider_info
* info
);