tags:

views:

534

answers:

2

on KDE, there's a possibility to execute a command when some event happen. for example one can execute a script when kmail receives a mail or when a akregator fetches a new feed.

I want to execute the script on a way I can retrieve the mail/feed subject in my script. is there a possibility to specify the program to execute:

myprogram <SUBJECT> ?

possibly specify it as an argument or an environment variable.

+1  A: 

No, but you can use dcop (KDE3) or qdbus (KDE4) from within the script to query KMail/Akregator about what the most recent new item is.

ephemient
how do I use dcop (KDE3) to query them about the name of the new item?
kiwi
+1  A: 

i think that what you're asking is "can i use knotify to execute a command when kmail receives mail with subject Foo?"

No, but you can create a filter in kmail to do the same. Under Settings > Configure Filters, you'll be able to create a new filter; in the lower left corner there's a Help button that goes over all the advanced features, including how to pipe received emails through external applications.

if that's not what you're looking for, you'll need to clarify your question.

joh6nn