Linux KDE: Send Via Email opens mailspring but doesnt open compose message with attachments

Description

Send Via Email option on File Explorer/Quick Share opens mailspring but doesn’t open compose message with attachments made

Similar Closed Issues

was fixed only for nautilus
was automatically closed

To Reproduce…

  1. Select a file in a file explorer
  2. Open right-click context menu
  3. Select share
  4. send via email

Expected Behavior

Mailspring opens with a new mail with attachments made

Setup

  • OS and Version: Linux, KDE Neon 5.24
  • Installation Method: SnapStore
  • Mailspring Version: 1.10.3-a476c230

Seems to be a regression bug, as this is not working on my Gnome Desktop anymore as well. :frowning:
I will try to have a look at it, but it may take a bit, as I am quite busy these days.

Do you know in which format the mailspring command is called by the sendto dialog from KDE?

1 Like

Hope you find the time for it :), I dun really know the format

I tried using this file to create a custom send via mailspring option but it seems to only work if there’s no existing window of mailspring open
~/.local/share/kservices5/ServiceMenus/mailspring.desktop

[Desktop Entry]
Type=Service
Actions=SendViaMailspring
Encoding=UTF-8
MimeType=application/octet-stream
X-KDE-ServiceTypes=KonqPopupMenu/Plugin

[Desktop Action SendViaMailspring]
Name=Send via mailspring
Exec=mailspring "%f"
Icon=share

That is a great hint. It seems that forwarding the command to the already running mailspring instance somehow fails, which creates an issue with it not working on Gnome anymore. That is definitely more complicated. But I’ll give it a try.

1 Like

I created a fix for the issue that the sendto does not work with the second window. See: Fix sendto functionality by correctly handling electron internal options by Phylu · Pull Request #2409 · Foundry376/Mailspring · GitHub

@Penguin98kStudio For the KDE issue, I need to know how KDE is handling the internal Send To functionality. I could provide a Mailspring package as a .deb or .rpm that contains some debug output. If you are willing to, I would create such package and provide it to you. Then you will need to start Mailspring from the command line and send me the log output from the terminal after using the Send To functionality. What do you think?

1 Like

Sure, I can help you with that.

Thanks for looking at this issue :slight_smile:

I am not sure but logically speaking KDE’s send to functionality most likely passes the same arguments to mailspring that the default email client Kmail’s cli needs to attach a file

@Penguin98kStudio Sorry for the very long delay. I was quite busy, but now I hope to have found a way how you can produce meaningful debug information using a custom build:

Can you please do the following for me?

  1. Install the custom build
  2. Start Mailspring from a terminal using mailspring
  3. Use the “Send To” Dialog from Dolphin
  4. Grab the output from the terminal where you originally started mailspring and paste it here (anonymized)

The output should look something like:

Argument received:  mailto:?attach=file:///home/mailspring/Desktop/file/to/send