caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.9k stars 384 forks source link

`host` parsed from user login (if present) for Emails #1095

Closed caronc closed 2 months ago

caronc commented 2 months ago

Description:

Related issue (if applicable): n/a

This was a report made on Discord where the URL should have worked (imo):

Apprise wasn't smart enough to pull the spectrum.net hostname from the user login for the host until this PR. The user above can still use the URL:

After this PR, the first URL will work. To avoid ambiguity, emails can now also be specified in the hostname if content was parsed elsewhere; hence the following URL is also valid now:

Checklist

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@email-host-detection-from-source

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "mailtos://?smtp=mobile.charter.net&pass=password&user=name@spectrum.net"
codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.27%. Comparing base (6cd528c) to head (ffb2dfd).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1095 +/- ## ======================================= Coverage 99.27% 99.27% ======================================= Files 138 138 Lines 17954 17964 +10 Branches 3663 3667 +4 ======================================= + Hits 17824 17834 +10 Misses 121 121 Partials 9 9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.