[Kde-pim] Re: Questions about KMail D-Bus interface

Thomas McGuire mcguire at kde.org
Mon Jan 24 23:16:58 GMT 2011


Hi,

On Sunday 23 January 2011 10:12:23 Florian Lindner wrote:
> I'm planning to use a filter to pipe mail to an external program. This
> script should do actions like creating a folder, setting its attributes
> and do the final delivery for this e-mail. For controlling kmail I intend
> to use the d-bus interface.
> 
> Regarding that interface and its behavior I have some questions:
> 
> - Is there a documentation around?

No, there is only the source, kmkernel.h/kmkernel.cpp.

> - Is dbusAddMessage the right place to deliver a message?

dbusAddMessage is only used to add messages to a folder, which is what the 
mail import tool, KMailCVT uses. Real sending needs something else. I know 
that KOrganizer sends emails, so there is probably a dbus function in 
KMKernel. Also there is the command line program ksendemail, also in the 
KDEPIM package.

> - How can I abort further processing with kmail? The script should say: I
> have taken of this message, don't worry. Writing nothing back at stdout
> does not seem to work.

Ah, you mean your script is executed as part of a filter? Maybe add an 
additional header to the mail, then add an additional filter step in KMail 
that aborts processing when it finds that header.

One a side note, most if not all of the dbus interface doesn't exist anymore 
in KMail 2, because there, you don't need KMail running for these tasks, you 
can simply use Akonadi. I guess in this case you need to write a small C++ 
wrapper for adding or sending a mail, and then use that wrapper application in 
a script.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110124/083254c7/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