[Kde-bindings] sending an email using korundum and dcop

Richard Dale rdale at foton.es
Tue Nov 6 08:47:59 UTC 2007


On Tuesday 06 November 2007 02:50:26 Chris Gow wrote:
> On Monday 05 November 2007 17:34:23 Caleb Tennis wrote:
> > > So, how do I get korundum to call the correct dcop function?
> >
> > Here's a snippet of what I did in an old app.  It might help.
> >
> >
> > @dcopclient = KDE::DCOPClient.new
> > @dcopclient.attach
> > @dcopclient.registerAs("fuel_state")
> >
> >
> > @dcop = KDE::DCOPRef.new("gina","MessageHandlerBase")
> > @dcop.setDCOPClient(@dcopclient)
> >
> >
> > @dcop.call("TriggerESTOPTimer(QString,unsigned int)","cuty_writer",
> > secs)
>
> Thanks. It helps, but doesn't seem to solve my problem. If I try to call a
> dcop function that takes only a string or no arguments, it works. If the
> function takes a boolean or any other non string argument. I get errors. I
> tried various functions kontact, kmail, klipper, kopete and konqueror.
For the original sendMessage call you need to pass empty strings rather than 
nils for the cc and bcc arguments. I've just tried this and it worked fine:

res = dcopref.sendMessage("rdale at foton.es", "richard.j.dale at gmail.com", 
"", "", "test dcop message", "body of message",[])

Boolean and other non-string arguments should certainly work, and I'm not sure 
what the problem is. Can you post the specific calls that don't work?

-- Richard




More information about the Kde-bindings mailing list