PHPackages                             fgiardina/mailer - 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. fgiardina/mailer

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

fgiardina/mailer
================

Laravel email sender

v1.2.53(5y ago)097MITHTMLCI failing

Since Dec 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fgiardina/mailer-package)[ Packagist](https://packagist.org/packages/fgiardina/mailer)[ RSS](/packages/fgiardina-mailer/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (0)

Mailer
======

[](#mailer)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/e14ac556b5589cd52f39c17f48193aa775f712cb6cf2629ccf7765ccaf738d02/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666769617264696e612f6d61696c65722e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/4c5ba4b62f9e69b576029d16ff80968c4319baa55aa2fb098aca55bc895fc59e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666769617264696e612f6d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fgiardina/mailer)

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

[](#installation)

```
composer require fgiardina/mailer
```

If you are using Laravel 5.5+, there is no need to manually register the service provider. However, if you are using an earlier version of Laravel, register the `MailerServiceProvider` in your `app` configuration file:

```
'providers' => [
    // Other service providers...

    Fgiardina\Mailer\MailerServiceProvider::class,
],
```

Publish
-------

[](#publish)

```
php artisan vendor:publish --provider="Fgiardina\Mailer\MailerServiceProvider"
```

Configure email settings
------------------------

[](#configure-email-settings)

.env file:

```
  MAIL_DRIVER=smtp
  MAIL_HOST=smtp.mailtrap.io
  MAIL_PORT=2525
  MAIL_USERNAME=xxxxxxxxxxxx
  MAIL_PASSWORD=xxxxxxxxxxxx
  MAIL_ENCRYPTION=null
  MAIL_FROM_ADDRESS=example@mail.com
  MAIL_FROM_NAME="example"

  MAILER_VIEWS_FOLDER=vendor.mailer #change custom path
  MAILER_SEND_ROUTE="/mailer/sendemail" #change custom route
  MAILER_TEST_ROUTE="/mailer/testemail" #change custom route
  MAILER_TEST_MAIL_FORM_ENABLE=true #false: disabled public access test from {MAILER_TEST_ROUTE}
```

Usage
-----

[](#usage)

- Web form

```
http://YOUR-DOMAIN/mailer/testemail
```

- Terminal or Postman client

```
curl -X POST \
  http://YOUR-DOMAIN/mailer/sendemail \
  -H 'Content-Type: application/json' \
  -d '{
    "to_name": "John Doe",
    "to_email": "john@doe.com",
    "to_bcc_email": "john2@doe.com",
    "subject": "Email title",
    "header": "Header Info",
    "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt",
    "footer": "Footer Info",
    "template": "format"
}'
```

- URL default: `http://YOUR-DOMAIN/mailer/sendemail`
- URL custom: `http://YOUR-DOMAIN/{MAILER_SEND_ROUTE}` replace by value in .env file

Required: `to_email`, `subject`, `body`, `template`

Templates
---------

[](#templates)

HTML template without format

```
  "template": "basic"
```

HTML formatted template

```
  "template": "format"
```

### Custom templates:

[](#custom-templates)

`Path: MAILER_VIEWS_FOLDER`

```
  "template": "mycustomtemplate"
```

`mycustomtemplate.blade.php`

```
// ...HTML

    @isset($data->header)
        {{ $data->header }}
    @endisset

    {{ $data->body }}

    @isset($data->footer)
        {{ $data->footer }}
    @endisset

// ...HTML
```

Attention!Never use {!! !!} in template. **This can cause security problems**License
-------

[](#license)

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~153 days

Total

19

Last Release

2081d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c520845dc685fc06ffa79d454c7def61f35487735b606fdaa7ca77c26750179?d=identicon)[fgiardina](/maintainers/fgiardina)

---

Top Contributors

[![fgiardina](https://avatars.githubusercontent.com/u/12735884?v=4)](https://github.com/fgiardina "fgiardina (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fgiardina-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/fgiardina-mailer/health.svg)](https://phpackages.com/packages/fgiardina-mailer)
```

###  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.3M227](/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)
