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

akvo / isco / 34256231-3dcb-409f-86d0-4f2e7f16d114
86%
main: 86%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: main
Ran 22 Sep 2026 04:14AM UTC
Jobs 1
Files 79
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:10AM UTC coverage: 86.462% (+0.2%) from 86.285%
34256231-3dcb-409f-86d0-4f2e7f16d114

Pull #675

semaphore

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

Transactional email went out through the Mailjet v3 REST API and the
Mailjet account is not delivering. Replace the client with the standard
library: `smtplib` plus `email.message.EmailMessage`. The environment
variable names match the Django projects in the other Akvo repositories,
so deployment wiring stays consistent across them.

The settings are read with `os.environ.get` rather than `os.environ[...]`.
The Mailjet credentials were read at import time, so the whole backend
failed to start when they were absent; now development and test
environments boot without a relay configured. Defaults describe the
common correct relay -- port 587 with STARTTLS on and implicit SSL off --
so a deployment that supplies only a host and credentials lands on a
working configuration. Neither TLS mode is inferable from the port
number, and picking the wrong one opens a plaintext socket against a
TLS-only port, which is what the timeout constant now bounds; the Mailjet
client bounded it at nothing at all.

`Email.data` returns an `EmailMessage` carrying a plain-text body with an
HTML alternative instead of Mailjet's payload dict. The rendered HTML
moves to its own `Email.html` property because the `/template/email`
preview endpoint read it back out of the payload under a key that no
longer exists. The `UserRecipient` shape is unchanged, so no call site in
`routes/` moves.

Three subjects in `util.i18n` are bilingual and written as triple-quoted
strings wrapped across source lines, so they carry a literal newline and
its indentation. Mailjet's JSON payload accepted that; a header may not
contain a linefeed. The subject is collapsed in the mailer rather than
rewritten in `util.i18n`, so the next bilingual subject someone wraps
does not reintroduce the failure.

The module-level `send(data)` helper and the `format_attachment` /
`attachment` path are dropped. Nothing called them, and porting the
attachment path to MIM... (continued)
Pull Request #675: [#674] Send mail over SMTP instead of through Mailjet

2033 of 2517 branches covered (80.77%)

Branch coverage included in aggregate %.

5567 of 6273 relevant lines covered (88.75%)

0.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
83.9
12.82% util/mailer.py
Jobs
ID Job ID Ran Files Coverage
1 34256231-3dcb-409f-86d0-4f2e7f16d114.1 22 Sep 2026 04:14AM UTC 79
86.46
Source Files on build 34256231-3dcb-409f-86d0-4f2e7f16d114
  • Tree
  • List 79
  • 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 #675
  • PR Base - main (#EF32F11E...)
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