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

Email improvements; name= and from= now synonymous #738

Merged
merged 6 commits into from
Nov 5, 2022

Conversation

caronc
Copy link
Owner

@caronc caronc commented Nov 3, 2022

Description:

Related issue (if applicable): #732

both mailgun:// and email:// parameter arguments name= and from= are now synonymous of each other. If you want to over-ride the from email address you can provide the following:

  • from=Luke%20Skywalker
  • from=luke@jedi.com
  • from=Luke%20Skywalker<luke@jedi.com>

As identified name= is now synonymous of the from=. It was not removed so it wouldn't break any existing configuration from previous Apprise versions.

  • name=Luke%20Skywalker
  • name=luke@jedi.com
  • name=Luke%20Skywalker<luke@jedi.com>

In previous version of a Apprise, the from= would accept the email address and name= would accept the over-ridden name. This is still in effect; the following is perfectly valid:

  • name=Luke%20Skywalker&from=luke@jedi.com

It's worth noting that providing both a name= and from= is still considered to be somewhat mutually exclusive (you should use one or the other) so Apprise will now generate a warning message if this occurs.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

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@732-from-email-improvements

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "mailto://user:pass@hostname?from=Luke<skywalker@gmail.com>"

@amotl this may break your changes in #679 a wee bit.

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (7287e13) compared to base (e7255df).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #738   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          113       113           
  Lines        14564     14585   +21     
  Branches      2966      2975    +9     
=========================================
+ Hits         14564     14585   +21     
Impacted Files Coverage Δ
apprise/URLBase.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyBase.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyEmail.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyMailgun.py 100.00% <100.00%> (ø)
apprise/utils.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amotl
Copy link
Collaborator

amotl commented Nov 3, 2022

@amotl this may break your changes in #679 a wee bit.

I would appreciate if #679 could be merged beforehand ;].

@caronc caronc force-pushed the 732-from-email-improvements branch from e3a433e to e716ca8 Compare November 3, 2022 19:29
@caronc caronc force-pushed the 732-from-email-improvements branch from a62bf10 to f11cbfd Compare November 5, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants