Skip to content

feat(email): create SMTP send injector (#23)#289

Open
mariot wants to merge 11 commits into
mainfrom
feature/20-create-smtp
Open

feat(email): create SMTP send injector (#23)#289
mariot wants to merge 11 commits into
mainfrom
feature/20-create-smtp

Conversation

@mariot

@mariot mariot commented Jul 6, 2026

Copy link
Copy Markdown
Member

Proposed changes

Testing Instructions

  1. Step-by-step how to test
  2. Environment or config notes

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

@mariot mariot requested review from Kakudou, Copilot and guzmud July 6, 2026 12:57
@mariot mariot self-assigned this Jul 6, 2026
@mariot mariot added filigran team Item from the Filigran team. do not merge Do not merge until this label is removed. feature Type: new feature or capability (feat:). injector: email labels Jul 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Email (SMTP) injector module to the OpenAEV injectors monorepo, including its runtime entrypoint, SMTP client, configuration schema, containerization, and initial tests/docs.

Changes:

  • Added a new email/ injector package (email_injector) with contract definition, config loader, and SMTP send implementation.
  • Added Docker build/run assets (Dockerfile, docker-compose.yml) plus sample configs (config.yml.sample, .env.sample).
  • Added initial tests and a README describing SMTP-specific configuration.

Reviewed changes

Copilot reviewed 16 out of 22 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
email/test/test_email_helper.py Adds a unit test for payload building.
email/test/test_email_client.py Adds unit tests for SMTP send behavior (mocked).
email/test/init.py Initializes the test package.
email/README.md Documents injector purpose and SMTP config keys.
email/pyproject.toml Defines the injector package + dependencies/dev tooling.
email/manifest-metadata.json Adds catalog/manager metadata for the injector image.
email/email-injector-findings.md Research/notes for future scope (signatures/headers/templates).
email/email_injector/openaev_email.py Injector entrypoint wiring config/contracts to SMTP send execution.
email/email_injector/helpers/email_helper.py Implements payload builder from inject content.
email/email_injector/helpers/init.py Package init for helpers.
email/email_injector/contracts_email.py Defines the Email inject contract (from/to/subject/body).
email/email_injector/configuration/injector_config_override.py Declares injector config schema including SMTP settings.
email/email_injector/configuration/config_loader.py Flattens OpenAEV/injector/SMTP config into daemon config.
email/email_injector/configuration/init.py Package init for configuration.
email/email_injector/client/email_client.py Implements SMTP send via smtplib.
email/email_injector/client/init.py Package init for client.
email/email_injector/init.py Package init for email injector.
email/Dockerfile Builds a container image for the email injector via Poetry.
email/docker-compose.yml Provides compose template to run the injector container.
email/config.yml.sample Provides a sample YAML config for manual deployment.
email/.env.sample Provides a sample env file for docker-compose deployment.

Comment thread email/test/test_email_client.py Outdated
Comment on lines +35 to +41
server = smtplib.SMTP(smtp_hostname, smtp_port)
if smtp_use_tls:
server.starttls()
if smtp_username and smtp_password:
server.login(smtp_username, smtp_password)
server.send_message(msg)
server.quit()
Comment on lines +15 to +18
# OpenAEV configuration (flattened)
"openaev_url": {"data": str(self.openaev.url)},
"openaev_token": {"data": self.openaev.token},
# Injector configuration (flattened)
Comment thread email/docker-compose.yml
Comment on lines +5 to +7
- OPENAEV_URL=${OPENAEV_URL}
- OPENAEV_TOKEN=${OPENAEV_TOKEN}
- INJECTOR_ID=${INJECTOR_ID}
Comment thread email/.env.sample
Comment on lines +5 to +9
OPENAEV_URL=ChangeMe
# admin account API token from the OpenAEV server
OPENAEV_TOKEN=ChangeMe

# INJECTOR Environment Variables
Comment thread email/config.yml.sample
Comment on lines +1 to +4
openaev:
url: 'http://localhost:3001'
token: 'ChangeMe'

Comment thread email/README.md Outdated
Comment on lines +7 to +8
SMTP settings are provided through the injector configuration (`config.yml`),
under the `injector` section, and are shared by every inject:
Comment thread email/pyproject.toml Outdated
@@ -0,0 +1,48 @@
[project]
name = "openaev-email-injector"
version = "2.260619.0"
Comment thread email/pyproject.toml Outdated
Comment thread email/email_injector/openaev_email.py Outdated
Comment on lines +28 to +29
self.helper = OpenAEVInjectorHelper(self.config, icon_bytes)
pass
@mariot

mariot commented Jul 7, 2026

Copy link
Copy Markdown
Member Author
image image image

@mariot mariot changed the title feature/20-create-smtp feat(email): create SMTP send injector (#23) Jul 7, 2026
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #289      +/-   ##
==========================================
+ Coverage   67.52%   68.06%   +0.53%     
==========================================
  Files          68       70       +2     
  Lines        3138     3191      +53     
==========================================
+ Hits         2119     2172      +53     
  Misses       1019     1019              
Files with missing lines Coverage Δ
email/email_injector/client/email_client.py 100.00% <100.00%> (ø)
email/email_injector/helpers/email_helper.py 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mariot mariot force-pushed the feature/20-create-smtp branch from 8818686 to 058b896 Compare July 7, 2026 09:59
@mariot mariot requested a review from Megafredo July 8, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Do not merge until this label is removed. feature Type: new feature or capability (feat:). filigran team Item from the Filigran team. injector: email

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(smtp): create SMTP/email send injector

3 participants