Download the PHP package ashraful19/laravel-mailbridge without Composer

On this page you can find all versions of the php package ashraful19/laravel-mailbridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mailbridge

Laravel MailBridge

Tests Docs Latest Version

Provider-neutral transactional and marketing email for Laravel 12+.

MailBridge keeps your application code stable while providers, SDKs, template ids, and marketing APIs vary behind adapters. Your app uses the same MailBridge methods while SendGrid, Amazon SES, Brevo, MailerSend, Resend, Postmark, Mailchimp, Kit, MailerLite, Mailgun, Mailjet, and AutoSend each run through their official SDKs internally.

Documentation

Full docs: https://ashraful19.github.io/laravel-mailbridge/

Source docs:

Quick Start

mailbridge:install opens a terminal checklist so you can install one or more provider SDKs. The base package does not install every SDK.

Set runtime provider settings in .env:

Optional: set provider-level sender defaults in config/mailbridge.php (for providers that should use a different sender than global MAIL_FROM_*):

Sender precedence is: ->from(...) at runtime -> mailbridge.providers.<provider>.from -> mailbridge.from (MAIL_FROM_*).

Configure template and list mappings in config/mailbridge.php (templates, lists).

Basic Usage

Existing Laravel mail stays compatible:

Send a Laravel Mailable through MailBridge:

Send a provider-hosted template:

Use provider-specific template data when providers expect different variable names:

Send through one provider for this request:

Subscribe a marketing contact:

Work with subscribers and campaigns using the same API across marketing providers:

Return Objects

Transactional send returns SendResult:

Marketing actions return MarketingResult:

Subscriber lookup returns SubscriberRecord|null:

Providers

Provider SDKs are installed only when selected, and each install command uses the exact SDK version tested by MailBridge.

Provider Lane Current adapter support Install
SendGrid Transactional + marketing raw send, hosted templates, categories, custom args, contacts, lists, campaigns php artisan mailbridge:install sendgrid
Amazon SES Transactional raw send, hosted templates, SES tags, raw MIME attachments php artisan mailbridge:install ses
Brevo Transactional + marketing raw send, hosted templates, tags, subscribers, campaigns php artisan mailbridge:install brevo
MailerSend Transactional raw send, hosted templates, personalization, tags php artisan mailbridge:install mailersend
Resend Transactional raw send, template payload, tags/headers php artisan mailbridge:install resend
Postmark Transactional raw send, hosted templates, tags, metadata, message streams php artisan mailbridge:install postmark
Mailchimp Transactional + marketing Mailchimp Transactional sends, audiences, subscribers, tags, campaigns php artisan mailbridge:install mailchimp
Kit Marketing subscribers, tags/forms/sequences, broadcasts php artisan mailbridge:install kit
MailerLite Marketing subscribers, groups, fields, campaigns php artisan mailbridge:install mailerlite
Mailgun Transactional raw send, hosted templates, tags, variables, metadata php artisan mailbridge:install mailgun
Mailjet Transactional + marketing raw send, hosted templates, subscribers, lists, campaigns php artisan mailbridge:install mailjet
AutoSend Transactional + marketing raw send, hosted templates, tags, metadata, contacts, lists, campaigns No SDK required — uses REST API directly

Run health checks anytime:

Smoke-test real provider APIs before releasing:

Features

Transactional email:

Feature Purpose
Raw HTML/text send Send simple app-rendered messages without a Laravel Mailable.
Laravel Mailable send Keep existing Laravel mail classes and route them through MailBridge.
Provider-hosted templates Send by config alias with template('welcome') or direct id with templateId(...).
Provider-specific template data Use data() for common variables and dataFor() for provider overrides.
Recipients Normalize to, cc, bcc, from, and replyTo across providers.
Attachments Add files or raw data with attach() and attachData().
Tags/categories Attach provider analytics tags where supported.
Metadata/custom args Attach safe message metadata for provider analytics and webhook correlation.
Provider override Send one message through a specific provider without changing config.
Fallback control Use withFallback() or withFallback(false) per send.
Testing fake Assert transactional sends without touching provider APIs.

Provider note: SendGrid, Brevo, and Mailjet marketing list IDs must be numeric. MailBridge validates these IDs before building provider payloads.

Marketing email currently implemented in the common API:

Feature Purpose
Subscriber subscribe Create or update contacts where the provider endpoint supports it.
Subscriber unsubscribe Remove a contact from a list or group.
Subscriber lookup/delete Read or delete a marketing contact.
List/group subscribe Subscribe contacts to configured list aliases.
Fields/attributes Sync custom subscriber profile data.
Campaigns Create, send, schedule, get, and delete campaign records where supported.
Provider override Run one marketing operation through a specific provider.
Fallback control Retry transient provider/network failures through configured fallbacks.
Testing fake Assert marketing subscriptions without provider calls.

Why MailBridge

Need MailBridge behavior
Keep Laravel Mailable classes Mail::send() still works; MailBridge can also send Mailable objects.
Avoid installing every SDK Provider SDKs are optional and installed per provider.
Prevent surprise SDK breaks Install commands use tested exact versions.
Use hosted templates Send by template('welcome') alias or direct templateId('...').
Switch provider per send Pass provider name: MailBridge::transactional('postmark').
Control fallback Use withFallback() or withFallback(false) per send.
Test safely Use MailBridge::fake() and assertions.

Exception Handling

MailBridge throws typed exceptions for common validation and configuration errors. All validation-focused exceptions extend MailbridgeValidationException, so existing broad catches still work.

Exception Trigger
MissingTransactionalRecipientException Transactional send has no to() recipient.
TemplatePayloadConflictException template() + templateId() are both set, or template send is combined with a Laravel Mailable.
MissingTransactionalContentException Non-template send has no html(), no text(), and no mailable content.
MissingFromAddressException No sender address is available from from(), mailbridge.providers.<provider>.from.address, or mailbridge.from.address.
MissingTemplateMappingException template('alias') has no usable provider mapping in mailbridge.templates.<alias>.<provider>. Empty values are treated as missing.
UnknownProviderException Selected provider key does not exist in mailbridge.providers.
UnknownDriverException Provider config uses an unsupported driver value.

For full guidance and catch examples, see Exception handling.

License

Laravel MailBridge is open-sourced software licensed under the MIT license.


All versions of laravel-mailbridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/mail Version ^12.0|^13.0
illuminate/process Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ashraful19/laravel-mailbridge contains the following files

Loading the files please wait ...