Download the PHP package ankitfromindia/mx18-laravel without Composer
On this page you can find all versions of the php package ankitfromindia/mx18-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ankitfromindia/mx18-laravel
More information about ankitfromindia/mx18-laravel
Files in ankitfromindia/mx18-laravel
Package mx18-laravel
Short Description Laravel package for MX18 Email API integration - send single/bulk emails and handle webhooks
License MIT
Homepage https://github.com/ankitfromindia/mx18-laravel
Informations about the package mx18-laravel
MX18 Laravel Package
Laravel package for MX18 Email API integration. Send single/bulk emails and handle webhooks with ease.
Version 2.1.0 - New Feature
🚀 New Features:
- ✅
addRecipient()method for efficient bulk emails - ✅ Multiple recipients with individual personalization in single API call
Version 2.0.0 - Major Release
🚀 New Features:
- ✅ Custom headers support
- ✅ Custom arguments for tracking
- ✅ Full MX18 API v1 compatibility
⚠️ Breaking Changes:
- Authentication changed from
Bearertoken toX-Api-Keyheader - See Migration Guide below
Features
- ✅ Send single emails
- ✅ Send bulk emails
- ✅ Handle webhooks with signature verification
- ✅ Support for HTML/text content
- ✅ File attachments
- ✅ Email personalization
- ✅ CC/BCC recipients
- ✅ Custom headers
- ✅ Custom arguments
- ✅ Laravel auto-discovery
Requirements
- PHP 8.3+
- Laravel 10.0+, 11.0+, or 12.0+
- MX18 account with API token
Installation
Configuration
1. Publish Config
2. Environment Variables
Add to your .env:
3. Get API Token
- Sign up at MX18
- Get your API token from Account Settings
- Verify your sender domain
Usage
Basic Email
Advanced Email with Personalization
File Attachments
Custom Headers and Arguments
Efficient Bulk Email (New in v2.1.0)
Bulk Email
Webhooks
1. Setup Webhook URL
Get your webhook URL:
Configure this URL in your MX18 Dashboard under Webhooks settings.
2. Handle Webhook Events
Create an event listener:
Create the listener:
3. Webhook Security
The package automatically verifies webhook signatures when MX18_WEBHOOK_SECRET is set. Invalid signatures return 401 Unauthorized.
API Response
Successful API calls return:
Error Handling
Configuration Options
Testing
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Security
If you discover any security vulnerabilities, please email [email protected] instead of using the issue tracker.
Credits
- Ankit Vishwakarma
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Migration from v1.x
Breaking Changes in v2.0.0
The authentication method has changed to match the official MX18 API specification:
Before (v1.x):
After (v2.0.0):
New Features Available
Your existing code will continue to work without changes. Only the internal authentication method has been updated.
All versions of mx18-laravel with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0