gnome-gmail icon indicating copy to clipboard operation
gnome-gmail copied to clipboard

Creates Email in Draft but no attachment

Open dkebler opened this issue 5 years ago • 3 comments

Running Linux Mint 19 (Ubuntu 18.04 under hood) with nemo file manager. Installed latest gnome-gmail deb 2.5.6.

Set up as preferred ap. Send as Email nemo action works but

  1. the created draft does not have the file attached.
  2. The created draft has a label of `Sending but when I open the draft the subject is blank.

Can't tell the version of the gmail api but I assume it's the latest.

Let me know how to provide you logs or more info that will help track this down. Does your app create it's own nemo action file? Maybe that's the problem?

dkebler avatar Jan 15 '19 17:01 dkebler

I'm guessing it's the nemo action

Exec=<send-by-mail.py %F>

which calls this python script

#!/usr/bin/python3 -OOt

import argparse
from itertools import chain
from subprocess import call

parser = argparse.ArgumentParser()
parser.add_argument('filelist', help='list of absolute paths separated by /#/')
args = parser.parse_args()

command = ['xdg-email'] + list(chain.from_iterable(('--attach', arg) for arg in args.filelist.split('/#/')))
call(command)

It uses xdg-email. Maybe xdg-email is the wrong tool or the command is bad. Is there a better more direct way to invoke gnome-gmail??

dkebler avatar Jan 15 '19 17:01 dkebler

from command line seems like attaching a file is creating a parsing error?

this works gnome-gmail "mailto:?Subject=Hello%20again"

but this gives error

$ gnome-gmail -r "testfiletosend"  "mailto:?Subject=Hello%20again"
Traceback (most recent call last):
  File "/usr/share/gnome-gmail/gnomegmail.py", line 1005, in <module>
    main()
  File "/usr/share/gnome-gmail/gnomegmail.py", line 979, in main
    from_address = fromFromMessage(message)
  File "/usr/share/gnome-gmail/gnomegmail.py", line 714, in fromFromMessage
    line = [x for x in message.split('\n') if 'FROM:' in x.upper()][0]
IndexError: list index out of range

dkebler avatar Jan 15 '19 18:01 dkebler

Is there a space in the name of the file that failed?

The "-r" option is not intended to be used that way. The attachment becomes part of the mailto:

gnome-mail "mailto:?subject=Hello%20again&attach=testfiletosend"

Either "attach" or "attachment" may be used. I'm not sure right now if a valid, fully formed recipient is required.

As a general rule, I use "xdg-open mailto:...". It would be interesting to know what the "command" is coming out of that script.

davesteele avatar Jan 15 '19 19:01 davesteele