Bug 182384 - KBugReport does not send mails
Summary: KBugReport does not send mails
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kbugreport (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-30 06:58 UTC by Ezequiel R. Aguerre
Modified: 2009-08-27 16:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This patch should fix it. (787 bytes, patch)
2009-01-30 07:01 UTC, Ezequiel R. Aguerre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ezequiel R. Aguerre 2009-01-30 06:58:13 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Fedora RPMs

I'm writing an application and KBugReport is not sending the bugs to the mail address I've configured.
It seems the problem is you are passing the arguments with extra spaces, like this: " --subject ", it should be: "--subject".
And when you finish writing data to the process you should close the channel, otherwise it will keep waiting forever.
The exit status of ksendbugmail is QProcess::NormalExit, but the exit status is 254, so you won't catch that with proc.exitCode() == 1, it's probably safer to do proc.exitCode() != 0.
Comment 1 Ezequiel R. Aguerre 2009-01-30 07:01:14 UTC
Created attachment 30738 [details]
This patch should fix it.

This patch should fix the problem. However, it does nothing about the comparison proc.exitCode() == 1, I think you should have a good reason to make it that way.
Comment 2 David Faure 2009-08-21 16:36:11 UTC
Indeed things are broken in this area. I see a ksendbugmail crash, an smtp relay error not reported up to the dialog, and your patch looks correct too. Assigning to me, but I have to go so I'll look into all this next week or the week after.
Comment 3 David Faure 2009-08-27 16:24:17 UTC
SVN commit 1016321 by dfaure:

Fix error handling inside ksendbugmail; e.g. when no internet available. Incomplete qt3 porting.
CCBUG: 182384


 M  +8 -7      main.cpp  
 M  +12 -14    smtp.cpp  
 M  +1 -0      smtp.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016321
Comment 4 David Faure 2009-08-27 16:40:59 UTC
SVN commit 1016338 by dfaure:

Commit patch by Ezequiel R. Aguerre to make kbugreport work again when sending bugs by email.
It was another qt3 porting bug: it was passing " --subject " instead of "--subject".
And closeWriteChannel is necessary otherwise it will keep waiting forever.
CCBUG: 182384


 M  +8 -4      kbugreport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016338
Comment 5 David Faure 2009-08-27 16:45:37 UTC
SVN commit 1016340 by dfaure:

The exitcode was 254 when passing wrong args to ksendbugmail indeed, so let's not just check for 1, but for != 0.
BUG: 182384


 M  +1 -1      kbugreport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016340