Safely test sending your emails by using this local SMTP server and viewing the results on the web interface.
By using this locally installed SMTP server you can be sure that your real customers will never see your test emails !
However you can see all of them by simply opening the provided interface in any browser.
If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:
curl -s http://getcomposer.org/installer | php
composer create-project jfoucher/mailocal
- That's it
cd mailocalto enter the directory just created by composer
bin/mailocalto run both the SMTP server and the web server
Alternatively you can:
yarn run buildto build the frontend assets
php bin/console email:serverto launch the SMTP server
php bin/console server:startto start Symfony's built-in webserver
- Configure your other apps to use this new local SMTP server :
- host :
2525(or the one you chose, see below)
- You can configure an SMTP username and password by setting the
SMTP_SERVER_PASSWORDfields in you
.envfile. Make sure you update your email client's credentials accordingly.
- host :
- Mailocal uses an SQLite database by default (in
var/data.db) but you can choose to use any other database by setting the correct URL in the
You can now view any emails you receive by opening http://localhost:8000 in your browser
The SMTP runs on port 2525 by default. Pass the
--port option to use another one, like this:
php bin/console email:server --port=587
This project is licensed under the MIT License - see the LICENSE.md file for details
Never use this in production, only run it on your local machine.