PHPackages                             sineld/onesignal-mail - 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. sineld/onesignal-mail

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

sineld/onesignal-mail
=====================

Package to send emails via Onesignal Mail Provider

51.6k↓79%PHP

Since Apr 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sineld/onesignal-mail)[ Packagist](https://packagist.org/packages/sineld/onesignal-mail)[ RSS](/packages/sineld-onesignal-mail/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Sineld - OneSignal Mail for Laravel
===================================

[](#sineld---onesignal-mail-for-laravel)

This is a wrapper for OneSignal Email for Laravel. You can send e-mails in your project just like you usually do with Laravel's native mailers, the package makes sure the e-mails are send via the OneSignal Mail API using your OneSignal Email account.

Requires
--------

[](#requires)

Workes with Laravel version 9.0, 10.00, 11.0 or higher.

### Installation

[](#installation)

- Step 1: Install package via composer.

```
composer require sineld/onesignal-mail:dev-main
```

- Step 2: Add your account and API keys to your **.env file**.

```
ONESIGNAL_MAIL_URL=https://onesignal.com/api/v1/notifications
ONESIGNAL_MAIL_API=
ONESIGNAL_MAIL_APP_ID=

```

- Step 3: Update **MAIL\_MAILER** with 'onesignal-mail' in your **.env file**.

```
MAIL_MAILER=onesignal-mail

```

- Step 4: Add this new mailer to your **config/mail.php**\* file.

```
'mailers' => [
    ...
    'onesignal-mail' => [
        'transport' => 'onesignal-mail',
        'api_url' => env('ONESIGNAL_MAIL_URL'),
        'api_key' => env('ONESIGNAL_MAIL_API'),
        'app_id' => env('ONESIGNAL_MAIL_APP_ID'),
    ],
    ...
],
```

- Step 5: In your **config/app.php** (Laravel 11+ **bootstrap/providers.php**) file go to your providers array and add the following package provider:

```
'providers' => [
    /*
     * Laravel Framework Service Providers...
     */
    ...
      Sineld\OneSignalMail\OneSignalMailServiceProvider::class
    ...
],
```

### Usage

[](#usage)

```
// Create **contact.blade.php** file under **resources/views** folder with this content:
Hello {{ $name }}, ({{ $email }})

{{ $subject }}

{{ $body }}

// Send your email
$data = [
    'name' => 'Recieptant Name',
    'email' => 'recieptant-name@gmail.com',
    'subject' => 'Hello World!',
    'body' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
];

Mail::send('contact', $data, function ($mail) use ($data) {
    $mail
        ->to(
            $data['email'],
            $data['name']
        )
        ->subject($data['subject'])
        // ->replyTo('support@your-company.com')
        ;
});

// or use mailables!
```

Read Laravel's documentation on how to send E-mails with the Laravel Framework.

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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://avatars.githubusercontent.com/u/445349?v=4)[Sinan Eldem](/maintainers/sineld)[@sineld](https://github.com/sineld)

---

Top Contributors

[![sineld](https://avatars.githubusercontent.com/u/445349?v=4)](https://github.com/sineld "sineld (8 commits)")

### Embed Badge

![Health badge](/badges/sineld-onesignal-mail/health.svg)

```
[![Health](https://phpackages.com/badges/sineld-onesignal-mail/health.svg)](https://phpackages.com/packages/sineld-onesignal-mail)
```

###  Alternatives

[bigbharatjain/laravel-clickatell

This package makes it easy to send sms using clickatell.com with Laravel 5.

1435.2k](/packages/bigbharatjain-laravel-clickatell)[motomedialab/smtp2go

Send emails via API using the first-class email courier SMTP2Go

1323.6k](/packages/motomedialab-smtp2go)

PHPackages © 2026

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