Lara-Mail is a lightweight, elegant email-sending web application built with Laravel. Designed for simplicity and efficiency, it provides a clean interface to send emails effortlessly, complete with loading animations and pop-up notifications for enhanced user experience.
-
Dynamic Email Sending: Easily send customized emails with a subject, body, and recipient information.
-
Responsive Design: Clean, mobile-friendly UI styled with Tailwind CSS.
-
Laravel Blade Templates: Reusable components for quick development.
-
Customizable Email Templates: Beautiful, professional email designs ready for use.
-
File attachment: supports file attachment up to 5MB to send docs, ppt, image and pdf.
-
For the web view: the web app is accessible at http://127.0.0.1:8000/send URL.
-
For REST api: use http://127.0.0.1:8000/api/send URL.
the json format is like this:
{ "recipient": "[email protected]", "subject": "Subject of the Email", "body": "body of the message!", "contact_info": "sender address (links)" }
use form data if you want to attach files and use key "attachment" for the file. if you want to tryout file attachement: try the 'dev' branch.
Follow these steps to get the project running locally:
-
Clone the repository:
git clone https://github.com/BekaMan95/lara-mail.git lara-mail
cd lara-mail
-
Install Dependencies: install composer dependencies,
composer install
install node dependencies,
npm install
create storage link,
php artisan storage:link
-
Set up your environment: Copy .env.example to .env:
cp .env.example .env
Configure your environment variables in .env. Here’s an example for setting up email:
MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME[email protected] MAIL_PASSWORD=email.token MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS="[email protected]" MAIL_FROM_NAME="${APP_NAME}"
-
Generate application key:
php artisan key:generate
-
Build UI Components:
npm run build
alternatively, if you just want a taste, use 'run dev' on separate terminal.
npm run dev
-
Start the development server:
php artisan serve
The application will now be accessible at http://127.0.0.1:8000.