geopython / geopython/GeoHealthCheck

Streamline email functionality

Open
#417 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
92
Forks
75
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Email is sent in two places: in `notifications.py` and in `util.py` (`send_email` function).
Via #416 some fixes were made in `notifications.py` to cope with various email configurations TLS, no Auth etc, for both Docker and regular installs. This is for Resource notification only. All other email (lost password, status summary, ..) is still sent
with `util.py-send_email`.

**Describe the solution you'd like**
Provide a single `send_email()` function for all email-sending cases. Best is to take `util.py-send_email` and extend with the implementation in `notifications.py`. Make the function robust for config errors. May still be lean/silently fail, on `login()` failure as that is optional and may break existing installs.

**Describe alternatives you've considered**
We could discard `SMTPLib` and use a higher level email lib. But that also introduces an additional dependency, plus may break existing installations.

**Additional context**
N.A.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.