• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

akvo / siwins / #763
82%
main: 82%

Build:
Build:
LAST BUILD BRANCH: bugfix/210-handle-missing-notification-recipients
DEFAULT BRANCH: main
Ran 22 Sep 2026 04:46AM UTC
Jobs 1
Files 73
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Sep 2026 04:41AM UTC coverage: 82.212% (+0.04%) from 82.173%
#763

Pull #209

coveralls-python

zuhdil
[#208] Send mail over SMTP instead of through Mailjet

Seed/sync notification mail went out through the Mailjet v3 REST API,
and the account stopped delivering: Mailjet accepted every message and
delivered none, while credentials, sender validation, SPF and DKIM all
reported healthy. Replace the client with `smtplib` and
`email.message.EmailMessage` from the standard library. `mailjet-rest`
is dropped from the requirements; `requests` is pinned directly, so
nothing else loses a transitive dependency.

The new settings are `EMAIL_HOST`, `EMAIL_PORT`, `EMAIL_HOST_USER`,
`EMAIL_HOST_PASSWORD`, `EMAIL_USE_TLS`, `EMAIL_USE_SSL` and
`EMAIL_FROM`. The names match the Django projects at
akvo/african-bamboo-dashboard and akvo/akvo-mis so that deployment
wiring stays consistent across repositories, even though there is no
framework mail backend here to plug them into.

Several choices are worth spelling out.

Every setting is read with `os.environ.get`. Mailjet's credentials were
read with `os.environ[...]` at import time, so a backend missing them
would not start at all; now development and test environments boot
without a relay configured, and a missing host is reported when
something actually tries to send.

The fallbacks are written as

    EMAIL_PORT = int(os.environ.get("EMAIL_PORT") or 587)

rather than as a `get` default, because Compose passes
`- EMAIL_PORT=${EMAIL_PORT}` through as an empty string when the
variable is unset in the shell. That value is present as far as `get`
is concerned, which would make `int("")` raise and would read an empty
`EMAIL_USE_TLS` as "not true" — quietly dropping the connection to
plaintext.

Defaults are those of an ordinary submission relay: port 587 with
STARTTLS on and implicit SSL off, so a deployment supplying only a host
and credentials lands on the common correct configuration. Neither TLS
mode is inferable from the port, so a relay on 465 must set both
`EMAIL_USE_SSL` and `EMAIL_USE_TLS` explicitly; with the wron... (continued)
Pull Request #209: [#208] Send mail over SMTP instead of through Mailjet

1002 of 1292 branches covered (77.55%)

Branch coverage included in aggregate %.

2968 of 3537 relevant lines covered (83.91%)

0.84 hits per line

Coverage Regressions

Lines Coverage ∆ File
13
82.05
1.85% utils/mailer.py
Jobs
ID Job ID Ran Files Coverage
1 #763.1 22 Sep 2026 04:46AM UTC 73
82.21
Source Files on build #763
  • Tree
  • List 73
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Pull Request #209
  • PR Base - main (#)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc