Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI not taking URL arguments after the first #615

Closed
Modo11 opened this issue Jun 23, 2022 · 7 comments
Closed

CLI not taking URL arguments after the first #615

Modo11 opened this issue Jun 23, 2022 · 7 comments
Labels

Comments

@Modo11
Copy link

Modo11 commented Jun 23, 2022

📣 Notification Service(s) Impacted

Apprise CLI

🐞 Describe the bug

Not sure if I'm missing something, but the cli doesn't seem to read URL arguments after the first (denoted by ?)
In verbose it says: "E-Mail URL mailtos://hotmail.com?to=workt1500@hotmail.com unpacked as:", but that's not the complete url I wrote.

This particular command fails because of "Invalid --from-- email specified", but I think it just didn't read it.

💡 Screenshots and Logs

Screenshot from 2022-06-23 11-50-31 (1)

@Modo11 Modo11 added the bug label Jun 23, 2022
@caronc
Copy link
Owner

caronc commented Jun 23, 2022

You're not providing the user:password@hotmail.com.

If my Hotmail Address was user@hotmail.com and my password was password to access it. My Apprise URL would read: mailto://user:password@hotmail.com

By default, that will email yourself.

But you can optionally send it to someone else by updating the URL to read:
mailto://user:password@hotmail.com/someone.else@example.com

@Modo11
Copy link
Author

Modo11 commented Jun 27, 2022

Hello, thank you for your answer and sorry for my late response, I had a complication with my PC.

Yes, that was my mistake, with the user:password@hotmail it does send the email.
However I think the part that it doesn't seem to read URL arguments still stands.

Here I try two URLs, they are the same with just the "name" and "to" arguments switched. The results are on screenshots below. When the to argument is first, the email is correctly sent to @yahoo email, but without the specified name.

correct_to

When I switch them and name argument is first, the email is sent to the default @Hotmail, not the @yahoo that's in the argument. This time the name works

correct_name

@caronc
Copy link
Owner

caronc commented Jul 2, 2022

Hi, in both cases, (swaping the to with name, i get the same results (and parse the name correctly). I created some Test cases (see link above) and verify. Maybe i'm not correctly reproducing your issue?

@caronc
Copy link
Owner

caronc commented Jul 5, 2022

Ahh! It took some time, but i finally found out what you're doing wrong.

Your URL on the command line isn't in quotes....

So the & in the URL is being interpreted by your Shell (CLI) and running into the background.

Try the command:

# The key here is "quote" the URL so the the & doesn't truncate your request early (launching
# what was written before it in the background). ... You can see this happening in you
# screenshot where it writes:
#  [1] 6034
# 
# Below has the URL quoted:
apprise -vvvv --body="My Message" \
   "mailto://workt1500:password@hotmail.com?name=test%20name&to=workt1500@yahoo.com"

@caronc
Copy link
Owner

caronc commented Jul 6, 2022

I still leveraged the issue you brought forth and allowed people to over-ride email template defaults if they chose to. So your investigation of just being a typo still amounted to some improved code! That's a positive! 🚀

@caronc
Copy link
Owner

caronc commented Jul 6, 2022

Just as a final note, i added your situation to the Troubleshooting area for future users.

@caronc
Copy link
Owner

caronc commented Jul 14, 2022

Closing issue. Please feel free to keep me know if you're still experiencing any issues. But this is just related to not providing quotes around the URL on the command line

@caronc caronc closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants