Skip to content

adding mailpit to codespaces#24

Merged
alikon merged 2 commits intomainfrom
mailpit
Jan 18, 2026
Merged

adding mailpit to codespaces#24
alikon merged 2 commits intomainfrom
mailpit

Conversation

@alikon
Copy link
Copy Markdown
Owner

@alikon alikon commented Jan 18, 2026

Summary by Sourcery

Configure the development container to use Mailpit for SMTP email testing in Joomla within Codespaces.

New Features:

  • Add a Mailpit service to the devcontainer Docker Compose setup for capturing outbound emails.
  • Configure Joomla mail settings in the post-create script to send email through the Mailpit SMTP server.
  • Document Mailpit access details in the Codespaces helper output for easier email testing.

Enhancements:

  • Expose HTTPS port 443 from the Joomla web service in the devcontainer for secure access.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jan 18, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Configures Joomla in the Codespaces devcontainer to use a new Mailpit service for SMTP testing and documents its usage, while also exposing HTTPS on the web container.

Sequence diagram for Joomla sending email via Mailpit in Codespaces

sequenceDiagram
  actor Developer
  participant Browser
  participant JoomlaApp
  participant MailpitSMTP
  participant MailpitWebUI

  Developer->>Browser: Trigger action that sends email
  Browser->>JoomlaApp: HTTP request (port 80 or 443)
  JoomlaApp->>MailpitSMTP: SMTP connect smtphost=mailpit smtpport=1025 smtpauth=0 smtpsecure=none
  MailpitSMTP-->>JoomlaApp: SMTP 250 OK
  JoomlaApp->>MailpitSMTP: Send email data
  MailpitSMTP-->>JoomlaApp: SMTP 250 Queued
  MailpitSMTP->>MailpitWebUI: Store email for display

  Developer->>Browser: Open Mailpit Web UI (port 8025)
  Browser->>MailpitWebUI: HTTP request to list emails
  MailpitWebUI-->>Browser: Render captured emails
Loading

File-Level Changes

Change Details Files
Configure Joomla mail settings to route all outgoing mail through Mailpit in the devcontainer setup script.
  • After core Joomla config, set mailer to SMTP via cli/joomla.php
  • Point SMTP host to the new Mailpit service, with port 1025
  • Disable SMTP authentication and security (smtpauth=0, smtpsecure=none) for local testing
.devcontainer/post-create.sh
Document Mailpit usage details in the Codespaces helper output.
  • Extend the generated codespace-details.txt messaging to include Mailpit as the email testing endpoint
  • Instruct users how to access the Mailpit Web UI via the Ports tab and explain that Joomla emails will appear there
.devcontainer/post-create.sh
Add a Mailpit service container to the devcontainer docker-compose setup and expose HTTPS on the web container.
  • Expose port 443 on the existing web service for HTTPS access
  • Add a Mailpit service based on the axllent/mailpit image with port 8025 mapped for its Web UI
  • Configure Mailpit to restart unless stopped and run alongside the existing services
.devcontainer/docker-compose.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The Joomla mail configuration uses smtpsecure=none, but Joomla typically expects an empty string, ssl, or tls; consider setting this to an empty value (or the correct enum) to avoid misconfiguration.
  • You exposed port 443:443 for the php-apache service but there’s no corresponding HTTPS setup shown; either configure the container to listen on 443 or drop the mapping to avoid confusion.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The Joomla mail configuration uses `smtpsecure=none`, but Joomla typically expects an empty string, `ssl`, or `tls`; consider setting this to an empty value (or the correct enum) to avoid misconfiguration.
- You exposed port `443:443` for the `php-apache` service but there’s no corresponding HTTPS setup shown; either configure the container to listen on 443 or drop the mapping to avoid confusion.

## Individual Comments

### Comment 1
<location> `.devcontainer/docker-compose.yml:11` </location>
<code_context>
       - ./xdebug.ini:/usr/local/etc/php/conf.d/99-xdebug.ini
     ports:
       - "80:80"
+      - "443:443"
       - "3306:3306"
       - "6080:6080"
</code_context>

<issue_to_address>
**issue:** Exposing container port 443 directly on host 443 can easily conflict with local services

If port 443 is already in use on the host (e.g., by a local reverse proxy or web server), this binding will fail or conflict. For devcontainers, consider omitting the explicit port mapping and using `forwardPorts` in `devcontainer.json`, or mapping to a different host port (e.g., `8443:443`) to avoid clashes on contributors’ machines.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- ./xdebug.ini:/usr/local/etc/php/conf.d/99-xdebug.ini
ports:
- "80:80"
- "443:443"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: Exposing container port 443 directly on host 443 can easily conflict with local services

If port 443 is already in use on the host (e.g., by a local reverse proxy or web server), this binding will fail or conflict. For devcontainers, consider omitting the explicit port mapping and using forwardPorts in devcontainer.json, or mapping to a different host port (e.g., 8443:443) to avoid clashes on contributors’ machines.

@alikon alikon merged commit 42c4ff9 into main Jan 18, 2026
24 checks passed
@alikon alikon deleted the mailpit branch January 18, 2026 10:18
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.

1 participant