A simple API to send multiple emails asynchronously
This project was built with Laravel and MySQL.
- PHPUnit (https://phpunit.de)
- Faker (https://github.com/fzaninotto/Faker)
To run the API, you must have:
Create an .env
file using the command. You can use this config or change it for your purposes.
$ cp .env.example .env
Configure environment variables in .env
for dev environment based on your MYSQL database configuration
DB_CONNECTION=<YOUR_MYSQL_TYPE>
DB_HOST=<YOUR_MYSQL_HOST>
DB_PORT=<YOUR_MYSQL_PORT>
DB_DATABASE=<YOUR_DB_NAME>
DB_USERNAME=<YOUR_DB_USERNAME>
DB_PASSWORD=<YOUR_DB_PASSWORD>
API End points and documentation can be found at: Postman Documentation
List of all API endpoints:
POST /api/send
GET /api/list
Enable Bearer Token on API calls. use the value in API_KEY
in for token.
Kindly check API documentation for sample
Install the dependencies and start the server
$ composer install
$ php artisan key:generate
$ php artisan migrate
$ php artisan serve
You should be able to visit your app at http://localhost:8000
To run integration tests:
$ composer test