[Kde-pim] MessageQueueJob sends email but returns error

Shaheed Haque srhaque at theiet.org
Sat Mar 10 15:19:41 GMT 2012


I agree with David.

There are several cases in my code where I perform an operation
knowing that it might or might not affect any items. At the moment,
there is no option but for me to test strings to see if the error
return is a harmless (for me) "no items affected" or something that is
an actual problem.

2012/3/10 David Jarvie <djarvie at kde.org>:
> When KAlarm sends an email using MailTransport::MessageQueueJob, the email is sent successfully but the following error is reported: "Failed to store result in item". The transport used is sendmail (for a user without any kmail configuration).
>
> This error text comes from SendJob::doEmitResult() (in kdepim-runtime/agents/maildispatcher/) when a StoreResultJob returns an error. This error comes from ItemFetchJob called in StoreResultJob::doStart(). The ItemFetchJob returns the error:
>
> "Unknown error (Item query returned empty result set)"
>
>
> There are two separate issues here:
>
> 1) An error in either the MailDispatcher agent or in Akonadi is occurring, which needs to be fixed.
>
> 2) A more general problem is that Akonadi jobs don't return useful error codes, only error strings, so it isn't possible for applications to test whether they care about the errors. In this particular case, using sendmail, the fact that an Item hasn't been created in outbox doesn't really matter, but because KAlarm doesn't know which error has occurred, it has to inform the user who will then think that the mail hasn't been sent, when it actually has been. If Akonadi jobs could return unique error codes for each possible error, this would be really useful.
>
> --
> David Jarvie.
> KDE developer.
> KAlarm author -- http://www.astrojar.org.uk/kalarm
>
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list