* src/maemo/easysetup/modest-presets.c:
(modest_presets_get_info_server_security): Do not report secure auth
if there is none.
* src/modest-protocol-info.c: Use the defines for the gconf key names
for secure authentication. This was not working because we were writing
Password and reading password, and the check was case sensitive.
With this, gmail now works for receiving and sending when created via
easysetup.
pmo-trunk-r2163
2007-06-11 Murray Cumming <murrayc@murrayc.com>
* src/maemo/easysetup/modest-presets.c:
2007-06-11 Murray Cumming <murrayc@murrayc.com>
* src/maemo/easysetup/modest-presets.c:
+ (modest_presets_get_info_server_security): Do not report secure auth
+ if there is none.
+ * src/modest-protocol-info.c: Use the defines for the gconf key names
+ for secure authentication. This was not working because we were writing
+ Password and reading password, and the check was case sensitive.
+ With this, gmail now works for receiving and sending when created via
+ easysetup.
+
+2007-06-11 Murray Cumming <murrayc@murrayc.com>
+
+ * src/maemo/easysetup/modest-presets.c:
(modest_presets_get_info_server_security): Correct the key name for
SecureSmtp, because it seems to be case-sensitive.
* src/maemo/easysetup/modest-wizard-dialog.c: (create_title):
(modest_presets_get_info_server_security): Correct the key name for
SecureSmtp, because it seems to be case-sensitive.
* src/maemo/easysetup/modest-wizard-dialog.c: (create_title):
ModestPresetsSecurity security_outgoing =
modest_presets_get_info_server_security (priv->presets, provider_id,
FALSE /* incoming */);
ModestPresetsSecurity security_outgoing =
modest_presets_get_info_server_security (priv->presets, provider_id,
FALSE /* incoming */);
+
+ /* TODO: There is no SMTP authentication enum for presets,
+ so we should probably check what the server supports. */
protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_NORMAL;
if (security_outgoing & MODEST_PRESETS_SECURITY_SECURE_SMTP) {
protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_NORMAL;
if (security_outgoing & MODEST_PRESETS_SECURITY_SECURE_SMTP) {
+ /* printf("DEBUG: %s: using secure SMTP\n", __FUNCTION__); */
protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_SSL; /* TODO: Is this what we want? */
serverport_outgoing = 465;
protocol_authentication_outgoing = MODEST_PROTOCOL_AUTH_PASSWORD;
protocol_security_outgoing = MODEST_PROTOCOL_CONNECTION_SSL; /* TODO: Is this what we want? */
serverport_outgoing = 465;
protocol_authentication_outgoing = MODEST_PROTOCOL_AUTH_PASSWORD;
+ } else {
+ /* printf("DEBUG: %s: using non-secure SMTP\n", __FUNCTION__); */
protocol_authentication_outgoing = MODEST_PROTOCOL_AUTH_NONE;
protocol_authentication_outgoing = MODEST_PROTOCOL_AUTH_NONE;
- /* TODO: There is no SMTP authentication enum for presets. */
}
else {
/* Use custom pages because no preset was specified: */
}
else {
/* Use custom pages because no preset was specified: */
MODEST_PRESETS_KEY_OUTGOING, NULL);
if (val) {
g_free (val);
MODEST_PRESETS_KEY_OUTGOING, NULL);
if (val) {
g_free (val);
- info |= MODEST_PRESETS_SECURITY_SECURE_SMTP;
val = g_key_file_get_string (self->keyfile, provider_id,
MODEST_PRESETS_KEY_SECURE_SMTP, NULL);
val = g_key_file_get_string (self->keyfile, provider_id,
MODEST_PRESETS_KEY_SECURE_SMTP, NULL);
#include <string.h> /* strcmp */
#include <modest-protocol-info.h>
#include <modest-pair.h>
#include <string.h> /* strcmp */
#include <modest-protocol-info.h>
#include <modest-pair.h>
+#include <modest-defs.h>
/* FIXME: these names must match those of tny_camel_account_get_supported_secure_auth */
static const ProtocolInfo AuthProtocolMap[] = {
/* FIXME: these names must match those of tny_camel_account_get_supported_secure_auth */
static const ProtocolInfo AuthProtocolMap[] = {
- { MODEST_PROTOCOL_AUTH_NONE, "none", N_("None") },
- { MODEST_PROTOCOL_AUTH_PASSWORD, "Password", N_("Password") },
- { MODEST_PROTOCOL_AUTH_CRAMMD5, "cram-md5", N_("Cram MD5") }
+ { MODEST_PROTOCOL_AUTH_NONE, MODEST_ACCOUNT_AUTH_MECH_VALUE_NONE, N_("None") },
+ { MODEST_PROTOCOL_AUTH_PASSWORD, MODEST_ACCOUNT_AUTH_MECH_VALUE_PASSWORD, N_("Password") },
+ { MODEST_PROTOCOL_AUTH_CRAMMD5, MODEST_ACCOUNT_AUTH_MECH_VALUE_CRAMMD5, N_("Cram MD5") }