Skip to content

Add maildev for better local email dev#933

Open
Charl1996 wants to merge 7 commits intomainfrom
add-maildev-for-local-dev
Open

Add maildev for better local email dev#933
Charl1996 wants to merge 7 commits intomainfrom
add-maildev-for-local-dev

Conversation

@Charl1996
Copy link
Copy Markdown
Contributor

Product Description

N.A

Technical Summary

This PR introduces maildev as an option developers can use to more easily inspect what emails looks like locally.

Safety Assurance

Safety story

This only affects local development

Automated test coverage

N.A

QA Plan

N.A

Labels & Review

  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 15, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds README documentation for Maildev with a link and the local UI address at http://localhost:1080. Updates config/settings/local.py to add SMTP email configuration constants (EMAIL_BACKEND, EMAIL_HOST, EMAIL_PORT, EMAIL_USE_TLS, EMAIL_USE_SSL) pointing to localhost:1025. Adds a maildev service to docker-compose.yml using the maildev/maildev image and mapping ports 1080 and 1025. No other code or runtime behavior changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add maildev for better local email dev' clearly and concisely summarizes the main change: introducing maildev as a local development tool for email inspection.
Description check ✅ Passed The description provides relevant context about the change, explaining that maildev is being added for developers to inspect emails locally, which directly relates to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-maildev-for-local-dev

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Line 132: Fix the two typos in the README sentence: change "Mailev" to
"Maildev" and "availble" to "available" in the line that introduces Maildev and
its Docker image so the sentence reads correctly mentioning Maildev and that a
Docker image is available.
🧹 Nitpick comments (2)
README.md (1)

136-150: Consider adding language specifiers to code blocks.

Adding language identifiers (e.g., bash or shell) to fenced code blocks enables syntax highlighting and improves readability. This is flagged by markdownlint (MD040).

📝 Suggested fix
-```
+```bash
 docker pull maildev/maildev

```diff
-```
+```bash
 docker run -p 1080:1080 -p 1025:1025 --name connect-maildev maildev/maildev
</details>

</blockquote></details>
<details>
<summary>config/settings/base.py (1)</summary><blockquote>

`218-219`: **Use `env.bool()` for boolean environment variables.**

The current implementation only accepts the exact string `"True"`. Using `env.bool()` would be more robust (handles `true`, `1`, `yes`, `on`, etc.) and consistent with other boolean flags in this file (e.g., `DEBUG` on line 18).


<details>
<summary>♻️ Suggested fix</summary>

```diff
-MAILDEV_ENABLED = env("MAILDEV_ENABLED", default="False") == "True"
+MAILDEV_ENABLED = env.bool("MAILDEV_ENABLED", default=False)
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3cc33e and 0ac2bc8.

📒 Files selected for processing (3)
  • README.md
  • config/settings/base.py
  • config/settings/local.py
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~132-~132: Ensure spelling is correct
Context: ...tps://hub.docker.com/r/maildev/maildev) availble to run the tool, so you can just follow...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~146-~146: Ensure spelling is correct
Context: ...ur .env file (remember to restart the webserver if it's running) ``` MAILDEV_ENABLED=T...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.18.1)
README.md

136-136: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


136-136: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


142-142: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


142-142: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


148-148: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


148-148: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


152-152: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (1)
config/settings/local.py (1)

35-40: LGTM!

The Maildev configuration is correct - port 1025 matches Maildev's SMTP port, and disabling TLS/SSL is appropriate for local development. The noqa: F405 comment properly suppresses the linter warning for the star-imported MAILDEV_ENABLED.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread README.md Outdated
Comment thread config/settings/base.py Outdated

# EMAIL
# ------------------------------------------------------------------------------
MAILDEV_ENABLED = env("MAILDEV_ENABLED", default="False") == "True"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

env.bool() method can help process this boolean.

Also can we move this env variable to the local.py file?

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@config/settings/local.py`:
- Line 37: The `# noqa: F405` on the conditional `if MAILDEV_ENABLED:` is
unnecessary because MAILDEV_ENABLED is defined locally; remove the `# noqa:
F405` comment so the line reads simply `if MAILDEV_ENABLED:` (locate the
occurrence of MAILDEV_ENABLED in the conditional and drop the noqa directive).

Comment thread config/settings/local.py Outdated
@Charl1996 Charl1996 requested a review from pxwxnvermx February 2, 2026 09:38
Comment thread README.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can this be included into the docker-compose file? I think it makes more sense to have all the local services required there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See d02c1aa

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 176-180: Replace the word "webserver" with "web server" in the
Maildev paragraph and normalize the code block content by indenting the URL line
inside the triple-backtick block (ensure the line containing
"http://localhost:1080" is prefixed with four spaces) so the README.md snippet
passes markdownlint/style checks; update the paragraph text containing "web
server" and the code block that includes "http://localhost:1080".

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d9cf345 and d02c1aa.

📒 Files selected for processing (3)
  • README.md
  • config/settings/local.py
  • docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/settings/local.py

Comment thread README.md
Comment on lines +176 to +180
[Maildev](https://github.com/maildev/maildev) is a very simple-to-use tool for testing locally generated emails. You can inspect emails sent from the local webserver by accessing the following address in the browser:

```
http://localhost:1080
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix docs lint/style in the Maildev snippet.

Line 178 triggers markdownlint style warnings, and Line 176 reads better as “web server”. Consider this small cleanup:

📝 Suggested fix
-[Maildev](https://github.com/maildev/maildev) is a very simple-to-use tool for testing locally generated emails. You can inspect emails sent from the local webserver by accessing the following address in the browser:
+[Maildev](https://github.com/maildev/maildev) is a very simple-to-use tool for testing locally generated emails. You can inspect emails sent from the local web server by accessing the following address in the browser:
 
-```
-http://localhost:1080
-```
+    http://localhost:1080
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[Maildev](https://github.com/maildev/maildev) is a very simple-to-use tool for testing locally generated emails. You can inspect emails sent from the local webserver by accessing the following address in the browser:
```
http://localhost:1080
```
[Maildev](https://github.com/maildev/maildev) is a very simple-to-use tool for testing locally generated emails. You can inspect emails sent from the local web server by accessing the following address in the browser:
http://localhost:1080
🧰 Tools
🪛 LanguageTool

[grammar] ~176-~176: Ensure spelling is correct
Context: ... can inspect emails sent from the local webserver by accessing the following address in t...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.21.0)

[warning] 178-178: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 178-178: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 176 - 180, Replace the word "webserver" with "web
server" in the Maildev paragraph and normalize the code block content by
indenting the URL line inside the triple-backtick block (ensure the line
containing "http://localhost:1080" is prefixed with four spaces) so the
README.md snippet passes markdownlint/style checks; update the paragraph text
containing "web server" and the code block that includes
"http://localhost:1080".

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