qdbus has no such helpfull interface, but this is
the command I use
in the script:
Cmd="/usr/bin/qdbus org.kde.kmail /KMail
org.kde.kmail.kmail.checkMail"
There is a whole lot you can do with KMailIface,
kmail-mainwindow#1
(the current window), and MainApplication-Interface -- but
unfortunately there is nothing menu specific. It is pretty amazing
all that is there, but no rabbit to pull out of the dcop hat for
kmail menus.
We should grow a qdbus with those listing capabilities. The above
one liner, works about 99.99% of the time.