Version: 1.6.2 (using KDE KDE 3.2.3) Installed from: Mandrake RPMs OS: Linux I tried to use the following DCOP function in the KMail DCOP interface to send a message: MailTransportServiceIFace.sendMessage(QString to, QStrinc cc, QString bcc, QString subject, QString body, KURL::List attachments) KMail crashes while executing the DCOP call. If I put some URLs in the attachments, a KIO "in progress" window appears just before the crash. When I relaunch KMail, I can find the mail in the outbox.
Please try with KMail >= 1.7 and if it still crashes send the code snippet which causes the crash and the backtrace you get. Closing meanwhile, I can't reproduce it.
Things now work (I do DCOP calls with Gambas). Just Kmail warns that some characters (I think it is the 'î' in my first name) can't be encoded. Which character encoding is used when calling sendMessage() ? How can I change it ?
This is worse that I thought :-) The warning box gives me two choices: change the encoding, or ignoring the 'bad' characters. If I choose the first one, nothing happens. If I choose the second one, the mail is sent, but without the joined picture. The attachment path is correct, as KMail briefly displays the KIO copy window with the picture path in it. The Gambas code that does the DCOP call is just: PUBLIC SUB Main() DIM hApp AS KDEApplication hApp = Application["kmail"] hApp.MailTransportServiceIface.sendMessage("<my e-mail is hidden>", "<the destination is hidden too>", "", "", "test " & Now, "The body", [ "/home/benoit/Documents/photo.jpg" ]) END kmail is running before I run this program. If you want to know how I do DCOP calls, you can look in the ./src/lib/qt/kde/CApplication.cpp file in the gambas sources. In a few words, I cache the DCOP method definitions for each application. When I do the call, I convert any Gambas datatype to the corresponding Qt/KDE datatype, and if there is no errors, I do the DCOP call. I wrote the DCOP calling code by reading the kdcop sources.
After having closed Kopete, and reopen it, the e-mail where I chose 'changing the encoding' and that were not sent open in a window, with the attachment, and everything I passed to sendMessage. If I click on send, then the mail is sent.
I'm sorry, but I'm completely confused now. Can you please clearly state 1) the expected behavior and 2) the behavior that you think is a bug. Thanks.
I expected one of the two followings correct behaviours: 1) The not very useful one: open the composition window as if I wanted to send the mail directly in KMail. 2) The more useful one: silently send the mail with the attachment. What happens: KMail opens a message box to warn me that there is an encoding problem. -> First question: what is that problem ? -> I would prefer that the DCOP call returns an error code instead of displaying a message box. If I select 'change the encoding' in the message box, nothing happens. -> Actually, if I close Kopete and reopen it, a composition window appears, with my attachment, and every parameter I passed to sendMessage(). If I choose to ignore the bad characters, then the mail is sent, but without the attachment. -> Why ? The attachment is just a JPEG. It seems that there is a relation between this attachment and the meesage box displayed. I hope things are clearer now :-)
Ok, thanks for clarifying. I'll downgrade the bug for now.
As KDE4 no longer uses DCOP, do you still see the problem with KDE 4.3 ?
I don't know. I can try now that Gambas has a DBus component. Has KMail kept the same interface?
I don't know but you can check with either qdbus or qdbusviewer ... (I don't know the details though...)
Hello! Sorry to be the bearer of bad news, but this version of Kmail has been unmaintained for many years so I am closing this bug. Please try using the latest version of Kmail to see if your issue persists. If it does, please submit a new bug in "kmail2". Thank you!