Email capture
During development you do not want your site's emails (order notifications, password resets, form messages) to reach real people. With email capture on, those emails never leave your computer; they are collected in Coduva and read there. This feature arrives with Coduva 0.3.0.
Turning it on
- Click Email in the sidebar.
- Click Install and turn on.
Coduva downloads a small component called Mailpit (about 11 MB), verifies its SHA-256 value and starts it. Mailpit is reachable only from this computer (127.0.0.1) and does not connect to the internet.
Email capture starts and stops together with the web server. You can turn it off with Turn off whenever you want.
Connecting your app
| App | What you need to do |
|---|---|
PHP mail() | Nothing. Coduva points php.ini at it automatically. |
| WordPress | Nothing; wp_mail uses PHP's mail() function. If you use an SMTP plugin, enter the server details below. |
| Laravel | Paste the lines you get from Copy .env lines on the Email screen into .env. |
| Others | SMTP server 127.0.0.1, port 1025; no username or password. |
The lines for Laravel:
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=nullReading emails
The Email screen lists the latest emails with subject, sender, recipient and date; the list refreshes every few seconds. Clicking a row opens the email in the browser, where you can see the HTML view, plain text, headers and attachments. Open inbox shows all emails in the browser.
At most 500 emails are kept; older ones are deleted automatically. Delete all empties the inbox.
Troubleshooting
- The email is not in the list. Check that the top of the screen says "Running". If it says "Stopped", start Nginx or click Turn on.
- It stays "Stopped". Another program (usually another Mailpit or MailHog) may be using port 1025 or 8025. Close that program and try again.
mail()fails after turning it off. This is expected: with email capture off, PHP has no server to deliver the email to.