Bug 471115

Summary: When Kontact is set as the default email client, it does not reponse to "mailto" requests
Product: [Applications] kontact Reporter: cberlinger <cberlinger>
Component: mailAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: nicolas.fella
Priority: NOR    
Version: 5.23.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description cberlinger 2023-06-16 14:14:26 UTC
SUMMARY
When Kontact is install via flatpak on Fedora Kinoite and is set to the default email client, clicking on mailto link or using the right click service menu "Share->Send Via Email" will result in no action or an error "Unable to create KIO worker. Unknown protocol 'mailto' "

STEPS TO REPRODUCE
1. Install Fedora Kinoite, Install Kontact Flatpak via Flathub, Configure dummy email account 
2. In System Settings -> Applications -> Default Applications, set Email client to Kontact
3. Visit any website with a clickable "mailto" email address or right click on a file and select the service menu option "Share->Send Via Email"

OBSERVED RESULT
Error ("Unable to create KIO worker. Unknown protocol 'mailto' ") or nothing happens.

EXPECTED RESULT
A new mail window from the Kontact's Kmail App should appear with a pre-filled "to" box or attached file (pending on the testing method selected).

SOFTWARE/OS VERSIONS
Operating System: Fedora Kinoite Linux 38
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.9
Kernel Version: 6.3.7-200.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 480 Graphics

ADDITIONAL INFORMATION
Kontact Ver: Version 5.23.2 (23.04.2)
Install Method: Flathub flatpak
Comment 1 Nicolas Fella 2023-06-16 14:25:30 UTC
The same happens for non-Flatpak Kontact.

The problem is that Kontact's desktop file does not have a URL placeholder in the Exec field: https://invent.kde.org/pim/kontact/-/blob/master/src/data/org.kde.kontact.desktop#L72 

It also doesn't associate itself with the x-scheme-handler/mailto mime type, which is why it is not offered as a choice for default mail client