troubles when using imap



hello,
I have some trouble connecting to imap gmail account using tinymail.
i have the following error

** (process:8180): WARNING **: err: Failed to connect to IMAP server imap.gmail.com: Reading IMAP greeting failed

here is how i configured my account
        account = TNY_ACCOUNT (tny_camel_store_account_new ());

        tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (account), priv->session);
        camel_session_set_online ((CamelSession*)priv->session, priv->force_online);*

        tny_account_set_proto (account, "imap");
        tny_account_set_name (account, "my_test");
        tny_account_set_user (account, "test_account_0");
        tny_account_set_hostname (account, "imap.gmail.com");
        tny_account_set_port (account, "993");
        tny_account_set_id (account, "test_account_0 gmail com");

        TnyPair *option_security;
        option_security = tny_pair_new ("use_lsub", "");
        tny_camel_account_add_option (TNY_CAMEL_ACCOUNT (account), option_security);
        g_object_unref (option_security);
        option_security = tny_pair_new ("check_all", "");
        tny_camel_account_add_option (TNY_CAMEL_ACCOUNT (account), option_security);
        g_object_unref (option_security);
        option_security = tny_pair_new ("use_ssl", "");
        tny_camel_account_add_option (TNY_CAMEL_ACCOUNT (account),
        option_security);
        g_object_unref (option_security);
        tny_account_set_forget_pass_func (account, per_account_forget_pass);
        tny_account_set_pass_func (account, per_account_get_pass);

Can someone please help me.
I have another question, i want to implement a periodic check on a list of account. Does tnymail have a pre implemented mechanism that can help me to do this.
Thanks for reading my email looking forward for a response.
BR.
Mehdi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]