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

Improved mail header and introduced localized decimal values #534

Merged
merged 4 commits into from
Sep 29, 2024

Conversation

lars-devs
Copy link
Contributor

Hi! I'd like to PR two changes:

First concerns including the field "Date" in the mail nofitication. smtplib doesn't automatically default to the current time. Depending on which provider and e-mail client is used with TGTG scanner, e-mails get either displayed weird and/or labeled as Spam.

Posteo.de requires the e-mail to include Date:
grafik

Thunderbird falls back to the current time for all e-mails that miss "Date" in the header (see this post), so it displays all e-mails ever received by TGTG scanner as today.
grafik

Second change introduces optional formatting of price, value, and rating. I decided to use babel other than locale, so that the project depends on Python modules only. Using de_DE as locale and EUR as currency, this gets replaced:

price: 3.00 => price_localized: 3,00 €
rating: 4.7 => rating_localized: 4,7
value: 6.00 => value_localized: 6,00 €

Pull Request Checklist

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Did you make your Pull Request on the dev branch?
  • Does your submission pass tests? make test
  • Have you lint your code locally prior to submission? make lint
  • Could you build and run the docker images successfully? make images
  • Could you create a running executable? make executable
  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Have you written new tests for your changes, as applicable?
  • updated test for SMTP notifier.
  • Have you successfully ran manual tests with your changes locally?

@Der-Henning Der-Henning merged commit 07f5898 into Der-Henning:dev Sep 29, 2024
1 check passed
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.

2 participants