The next generation of writing emails.
High-quality, un-styled components for creating emails.
- Introduction
- Getting Started
- Email Components
- License
- Changelog
- Contributing
- Security
- Support
- Contributors
- Authors
- License
The purpose of this package is to offer convenient mechanisms for creating and sending responsive and visually appealing emails. It includes un-styled components at its core, allowing for more tailored and personalized design customization.
This section will walk you through the initial setup and basic usage of this package, ensuring you can quickly begin creating and sending responsive emails with the available fluent API and customizable components.
Before installing this package, make sure that your system meets the following requirements:
- PHP >= 8.2 (or newer) installed on your system.
- Laravel 9.x or newer installed on your system.
- Composer for managing dependencies.
- Install the Package via Composer
To install the package, run the following command in your Laravel project directory:
composer require --dev laranail/barua- Publish package files (Optional)
Run the following commands to publish the package assets, configuration, and template files to your Laravel application for further customization.
a. Publish package Service Provider
php artisan vendor:publish --provider=Simtabi\Laranail\Barua\Providers\BaruaServiceProvider // to publish the service providerb. Publish specific files using the following tags per your needs:
php artisan vendor:publish --tag=barua::blade-component-classes // to copy blade component classes
php artisan vendor:publish --tag=barua::blade-components // to copy blade components view files
php artisan vendor:publish --tag=barua::blade-templates // to copy all blade template files
php artisan vendor:publish --tag=barua::config // to copy config files
php artisan vendor:publish --tag=barua::lang // to copy lang files
php artisan vendor:publish --tag=barua::mail-template-classes // to copy mail template classes to the default app/Mail directory
php artisan vendor:publish --tag=barua::public-assets // to copy public assets files to the public directoryAlternatively, you can manually copy the files yourself to your Laravel application.
/config/*
/database/*
/resources/assets/*
/resource/lang/*
/resources/views/*
/src/Mail/Templates/*Optionally, add the following configuration options to change the package's default behavior:
- Environment Configuration
# this option exposes the package's default routes for testing purposes
BARUA_ENABLE_DEV_MODE=true
# this option enables the package to throw exceptions when errors occur
BARUA_ENABLE_ERROR_THROWING=true
# this option sets the maximum file size for attachments
BARUA_MAX_FILE_SIZE="5mb"
# this option sets the allowed MIME types for attachments
BARUA_ALLOWED_MIME_TYPES="application/pdf,image/jpeg,image/png,"-
Package You can publish the package configuration file located at
config/barua.phpto make changes to the default settings. -
Language You can publish the package language file located at
/resources/lang/en/barua.phpto make changes to the default language values. -
Mail The application will use the default Laravel mail configuration settings to send emails, as you have already set up in your Laravel application's environment file or as stored in the database.
'from' => [
'email' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],- View Templates & Components The package comes with a collection of Blade components that are un-styled by default, enabling you to design your email templates from scratch. If you prefer, you can also utilize your own pre-made HTML templates.
These Blade components, supplied by the package, are designed to be both responsive and customizable, facilitating the creation of attractive emails. These components can be employed to create a range of email templates, from straightforward text-based messages to more intricate layouts incorporating images and links.
You can find these components in the resources/views/emails or resources/views/vendor/barua directories once they've been published, and they can be easily tailored to meet your requirements.
You're encouraged to modify the provided templates/components to align with your specific needs, including any particular commands, configuration specifics, or features that should be made known to users from the outset.
All blade components were tested and found to be compatible with the following email clients:
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
composer installcomposer ciPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please see SECURITY for details.
Please see Support and Community for details.
Please see CONTRIBUTORS for details.
- Imani (@imanimanyara)
Open-sourced software licensed under the MIT license. Please see LICENSE for details.
