[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: How to download a file with kio_imap
From:       Bo Thorsen <bo () sonofthor ! dk>
Date:       2002-09-18 8:31:43
[Download RAW message or body]

On Tuesday 17 September 2002 14:14, Tobias Koenig wrote:
> Hi,
>
> I want to download and upload files with the imap kio slave, but after
> accessing a file with
> 	imap://user:password@localhost/home/user/testfile
> the slave returns some meta data instead of the content.
>
> Could somebody explain me how I can read and write this file in a
> simple way? Is it possible without meta data parsing?
>
> I hope sombody who has already worked on the implementation in kmail
> could help me.

Disclaimer: I just recently started to work on the KMail imap stuff, so I 
might be completely wrong here.

Let me take a wild guess at the metadata info: It contains a line saying 
"X-uid=something"? If not, you can find this by sending a slave with 
"imap://user:password@localhost/home/user/;UID=0:*;SECTION=ENVELOPE". Connect 
to the slave and you will get a slot invocation for each file in the 
directory. When you find the one that has the right file name, find the uid 
as above.

If so, find this uid number and fire off a new imap slave with 
"imap://user:password@localhost/home/user/;UID=the_uid" where "the_uid" is 
the number you found up there.

Bo.

-- 

     Bo Thorsen                 |   Praestevejen 4
     Senior Software Engineer   |   5290 Marslev
     Klarälvdalens Datakonsult  |   Denmark

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic