mu_mailbox_create() with IMAP/IMAPS

View: New views
3 Messages — Rating Filter:   Alert me  

mu_mailbox_create() with IMAP/IMAPS

by Vlad Galu-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

I'm trying to implement a quick & dirty IMAP client. I'm creating the
mailbox like this:
-- cut here --
mu_mailbox_t mailbox;
int ret = mu_mailbox_create(&mailbox, "imap://user:pass@...");
-- and here --

However, on return, ret is MU_ERR_NO_HANDLER, which seems to be set by
mu_registrar_lookup_url(). What puzzles me is the way this function is
called within _create_mailbox0(), specifically the
MU_FOLDER_ATTRIBUTE_FILE flag.

I ruled out URL parsing problems, by using the same URL with a mu_url_t
"object".

Any hints? Thanks in advance!



_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: mu_mailbox_create() with IMAP/IMAPS

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vlad Galu <vlad.galu@...> ha escrit:

> However, on return, ret is MU_ERR_NO_HANDLER, which seems to be set by
> mu_registrar_lookup_url().

First of all you need to register the "imap" mailbox type by using

  mu_registrar_record (mu_imap_record);

Regards,
Sergey


_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: mu_mailbox_create() with IMAP/IMAPS

by Vlad Galu-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sergey Poznyakoff wrote:

> Vlad Galu <vlad.galu@...> ha escrit:
>
>  
>> However, on return, ret is MU_ERR_NO_HANDLER, which seems to be set by
>> mu_registrar_lookup_url().
>>    
>
> First of all you need to register the "imap" mailbox type by using
>
>   mu_registrar_record (mu_imap_record);
>
> Regards,
> Sergey
>  
Thanks, Sergey!

Going one step further, mu_mailbox_open(mbox,
MU_STREAM_READ|MU_STREAM_WRITE) fails, returning MU_ERR_BASE, which is
not very helpful...

I do see a connection being established to imaps port on the IMAP server.

Any hints?

Thanks,
Vlad


_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils