Skip to content

Commit da453a0

Browse files
authored
[5.4] Add Mailpit Email Testing Support to Codespaces (joomla#46154)
* Add Mailpit
1 parent d09a64d commit da453a0

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
"6080": {
1515
"label": "Cypress GUI",
1616
"onAutoForward": "silent"
17+
},
18+
"8025": {
19+
"label": "Mailpit Web UI",
20+
"onAutoForward": "openPreview"
1721
}
1822
},
23+
"forwardPorts": [80, 443, 6080, 8025],
1924
"postCreateCommand": "bash ./.devcontainer/post-create.sh",
2025
"customizations": {
2126
"vscode": {

.devcontainer/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ services:
2525
volumes:
2626
- "mysql-data:/var/lib/mysql"
2727

28+
mailpit:
29+
image: axllent/mailpit:latest
30+
restart: unless-stopped
31+
ports:
32+
- "8025:8025"
33+
2834
volumes:
2935
mysql-data:

.devcontainer/post-create.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ echo "✅ Joomla installed."
5454
echo "--> Applying development settings..."
5555
# Enable debug mode and maximum error reporting for easier troubleshooting.
5656
php cli/joomla.php config:set error_reporting=maximum
57+
# Configure mail settings for Mailpit
58+
php cli/joomla.php config:set mailer=smtp
59+
php cli/joomla.php config:set smtphost=mailpit
60+
php cli/joomla.php config:set smtpport=1025
61+
php cli/joomla.php config:set smtpauth=0
62+
php cli/joomla.php config:set smtpsecure=none
5763
echo "✅ Development settings applied."
5864

5965
# --- 5. Install and Configure phpMyAdmin ---
@@ -148,6 +154,10 @@ DETAILS_FILE="${JOOMLA_ROOT}/codespace-details.txt"
148154
echo " Username: $DB_USER"
149155
echo " Password: $DB_PASS"
150156
echo ""
157+
echo "Mailpit (Email Testing):"
158+
echo " URL: Open the 'Ports' tab, find 'Mailpit Web UI' (8025), and click the Globe icon"
159+
echo " All emails sent by Joomla will appear here for testing"
160+
echo ""
151161
echo "Cypress E2E Testing:"
152162
echo " Run interactive tests: npx cypress open"
153163
echo " Run headless tests: npx cypress run"

0 commit comments

Comments
 (0)