aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-provider.c3
-rw-r--r--camel/providers/imap/camel-imap-store.c17
-rw-r--r--camel/providers/imap/libcamelimap.urls1
3 files changed, 16 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 9b962df5f4..91f397277a 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -46,7 +46,8 @@ static CamelProvider imap_provider = {
CAMEL_PROVIDER_IS_STORAGE,
CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST |
- CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH,
+ CAMEL_URL_ALLOW_PATH | CAMEL_URL_ALLOW_AUTH |
+ CAMEL_URL_ALLOW_SSL,
{ 0, 0 },
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index c13a584a33..db1c1f9c80 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -144,9 +144,18 @@ camel_imap_store_init (gpointer object, gpointer klass)
CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
CamelStore *store = CAMEL_STORE (object);
+ CamelURL *url;
+
+ url = CAMEL_SERVICE (store)->url;
+
+ if (!g_strcasecmp (url->protocol, "imaps")) {
+ remote_store->default_port = 993;
+ remote_store->use_ssl = TRUE;
+ } else {
+ remote_store->default_port = 143;
+ remote_store->use_ssl = FALSE;
+ }
- remote_store->default_port = 143;
-
imap_store->dir_sep = '\0';
imap_store->current_folder = NULL;
@@ -155,7 +164,7 @@ camel_imap_store_init (gpointer object, gpointer klass)
imap_store->connected = FALSE;
imap_store->subscribed_folders = NULL;
- imap_store->priv = g_malloc0(sizeof(*imap_store->priv));
+ imap_store->priv = g_malloc0 (sizeof (*imap_store->priv));
#ifdef ENABLE_THREADS
imap_store->priv->command_lock = e_mutex_new(E_MUTEX_REC);
#endif
@@ -469,7 +478,7 @@ imap_connect (CamelService *service, CamelException *ex)
* a bad password. So reconnect here.
*/
if (!connect_to_server (service, ex))
- return NULL;
+ return FALSE;
}
if (authtype)
diff --git a/camel/providers/imap/libcamelimap.urls b/camel/providers/imap/libcamelimap.urls
index c301c0ffac..cf07f4426f 100644
--- a/camel/providers/imap/libcamelimap.urls
+++ b/camel/providers/imap/libcamelimap.urls
@@ -1 +1,2 @@
imap
+imaps