Closed CharlieFehnel closed 6 years ago
I use gnome-gmail in a bash shell script
The '#' is a special character in bash. Quote or escape it.
I am disappointed in how quickly you dismissed my problem as a user error. I did put the '#' within double quotes when I assigned the variable that I use for the subject. Did you even bother to try to replicate my problem before your replied???
Try this command from the command line in a terminal: gnome-gmail 'mailto:charles.fehnel@gmail.com?subject=# Testing&body=This is a test.' On my system, both the subject and the body of the email ends up BLANK.
I inserted a "print(args.mailto)" statement in /usr/share/gnome-gmail/gnomegmail.py and args.mailto contains: mailto:charles.fehnel@gmail.com?subject=# Testing&body=This is a test. So, I'd say the "#" is getting to your code and is not being handled properly by your code.
So you did quote it - that is an important detail. That means it's not a bash comment character - it's a URI fragment delimiter. Try replacing it with "%23".
Yes, replacing the "#" with "%23" solved the problem. That brings up the question: what other characters do I have to worry about. I assumed that since I didn't have to replace spaces with "%20" that something somewhere was taking care of those kinds of issues.
Sure wish your first reply had mentioned the "%23".
Something to consider:
You got the proper answer to your original question, given the information provided. You got the ultimate answer in less than a day. You didn't pay for the app, or the support.
and you are ... annoyed.
I use gnome-gmail in a bash shell script to send a test email for an application that I am writing. I wanted to use a "#" as the first character in the Subject to invoke some special processing. When I sent an email with the Subject field starting with a "#", the email that was sent had a BLANK Subject field.
I am using version 2.5.4-3 on Ubuntu MATE 18.04.