PHPackages                             hashemi/too-mailable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. hashemi/too-mailable

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hashemi/too-mailable
====================

A Laravel based package for changing `Mail` transport and it's credentials from application layer in runtime. Simple and easy abstraction `Mailable` layer will be provided with this package. Currently this package support only SMTP

20PHP

Since Nov 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hashemirafsan/laravel-too-mailable)[ Packagist](https://packagist.org/packages/hashemi/too-mailable)[ RSS](/packages/hashemi-too-mailable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Too Mailable
====================

[](#laravel-too-mailable)

A Laravel based package for changing `Mail` transport and it's credentials from application layer in runtime. Simple and easy abstraction `Mailable` layer will be provided with this package. Currently this package support only SMTP.

Installation
------------

[](#installation)

You can start it from composer. Go to your terminal and run this command from your project root directory.

```
composer require hashemi/laravel-too-mailable
```

- If you're using Laravel, then Laravel will automatically discover the package. In case it doesn't discover the package then add the following provider in your `config/app.php`'s **providers** array.

```
Hashemi\TooMailable\TooMailableServiceProvider::class
```

Usage
-----

[](#usage)

This package will be provide `TooMailable` abstract class and you need to use your mail class. This abstract class has two abstract method.

- `transport(): string|EsmtpTransport`This method will be return package supported transport by string or custom transport class which will be `EsmtpTransport` inherited.
- `credentials(): array`This method will be return necessary credentials of current transport.

Example:

```
use Hashemi\TooMailable\TooMailable;

class SendVerificatioMail extends TooMailable
{
    //...

    public function transport()
    {
        return 'amazon';
    }

    public function credentials()
    {
        return [
            'username' => 'my-user',
            'password' => 'password-123',
            'region' => 'us-east-2'
        ];
    }
}
```

This package is also contain a config where each built-in transport class is configured. If anyone needs to override that transport they can easily do it by publish config from vendor. Config file will be stored in `config/too-mailable.php` on your application.

Example:

```
use Hashemi\TooMailable\Transports\{
    Amazon, Google, Mailchimp, Mailgun, Mailjet,
    OhMySmtp, Postmark, Sendgrid, SendInBlue
};

return [
    'transports' => [
        'amazon' => Amazon::class,
        'google' => Google::class,
        'mailchimp' => Mailchimp::class,
        'mailgun' => Mailgun::class,
        'mailjet' => Mailjet::class,
        'postmark' => Postmark::class,
        'sendgrid' => Sendgrid::class,
        'sendinblue' => SendInBlue::class,
        'oh-my-smtp' => OhMySmtp::class,
    ],
];
```

So if you want to change exists transport then,

```
return [
    'transports' => [
        //...
        'amazon' => MyNewAmazonTransport::class,
    ],
];
```

Or, if you want to add new transport then,

```
return [
    'transports' => [
        //...
        'converkit' => MyNewConvertKit::class
    ],
];
```

But `MyNewConvertKit` class should be implements `Hashemi\TooMailable\Interfaces\TransportInterface` interface. Credentials will be passed through `__construct` function of `MyNewConvertKit` class.

Contributing
------------

[](#contributing)

Pull requests are welcome. For any changes, please open an issue first to discuss what you would like to change.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/22c4489646c60d47047d71ea2e26e39e7a3ab6cc864499fd99b21d582ccac9c9?d=identicon)[hashemi](/maintainers/hashemi)

---

Top Contributors

[![hashemirafsan](https://avatars.githubusercontent.com/u/16275582?v=4)](https://github.com/hashemirafsan "hashemirafsan (25 commits)")

---

Tags

laravel-maillaravel-mailablelaravel-packagemailable

### Embed Badge

![Health badge](/badges/hashemi-too-mailable/health.svg)

```
[![Health](https://phpackages.com/badges/hashemi-too-mailable/health.svg)](https://phpackages.com/packages/hashemi-too-mailable)
```

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M228](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
