[Kde-pim] retrieving a resource from an akonadi:/ url
Ingo Klöcker
kloecker at kde.org
Tue Jun 28 20:03:40 BST 2016
On Tuesday 28 June 2016 15:14:51 Daniel Vrátil wrote:
> On Tuesday, June 28, 2016 10:54:15 AM CEST Jos van den Oever wrote:
> > Hi all,
> >
> > I'm writing a simple application on which I'd like to drop emails.
> > Dropping mails from kmail gives an akonadi:/ url. How can I talk to
> > akonadi to get the actual raw mail? The mails are all in maildir,
> > so getting the file path would be fine too.
>
> Hi,
>
> you have two options. You can use the Akonadi KIO slave that is part
> of kdepim-runtime to get the email - just pass the URL to KIO::get(),
> that should work. Alternatively you can use Akonadi directly. The URL
> is something like akonadi://?id=1234, so you use
> Akonadi::ItemFetchJob to retrieve an Akonadi::Item with that ID.
Since Jos knows that the mails are store locally in maildir, I suppose
there's a third options:
Fetch the remoteId of the mail (i.e. the mail's file path) using Akonadi
and then fetch the actual mail directly from disk. OTOH, if Akonadi
needs to be used anyway to fetch the remoteId, then it makes little
sense not to use Akonadi to fetch the full message.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20160628/713f216c/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list