PHPackages                             ocuru/notifyme - 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. ocuru/notifyme

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

ocuru/notifyme
==============

Allows applications to Notify users via various sources.

v1.0.0(8y ago)031MITPHPPHP &gt;=5.3.3

Since Jul 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Ocuru/NotifyMe)[ Packagist](https://packagist.org/packages/ocuru/notifyme)[ Docs](https://github.com/Ocuru/Notify)[ RSS](/packages/ocuru-notifyme/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (2)Used By (0)

Ocuru\\Notify
=============

[](#ocurunotify)

**Note: This package is under heavy development and is not recommended for production.**

Installing New
--------------

[](#installing-new)

Install using Composer.
=======================

[](#install-using-composer)

Installing
----------

[](#installing)

Install using Composer.

```
{
	"require": {
		"ocuru/notify": "dev-master"
	}
}
```

Available Services
------------------

[](#available-services)

Below are the services we currently support, more will be added over time.

#### Email Service

[](#email-service)

Service IDData Required for NotificationOptional Dataemail`ToName, ToEmail, FromName, FromEmail, Subject, MessagePlainText``isHTML, MessageHTML` (if `isHTML = true`), `ReplyToName, ReplyToEmail`##### Data

[](#data)

```
$Notify->ToName = "John Smith";
$Notify->ToEmail = "john@smith.com";

$Notify->FromName = "No Reply - Ocuru";
$Notify->FromEmail = "no-reply@ocuru.com";

// ReplyTo isnt Required
$Notify->ReplyToName = "Support - Ocuru";
$Notify->ReplyToEmail = "support@ocuru.com";

$Notify->Subject = "Example Notification";
$Notify->isHTML = true;
$Notify->MessagePlainText = "This is a example notification message.";
$Notify->MessageHTML = "This is a example notification message.";
```

Service IDData Required for NotificationOptional Dataemail`to.name, to.email, from.name from.email, message.is_html, message.plain_text``message.html` (if `message.is_html = true`)##### Data Format

[](#data-format)

```
$data = [
	"to" => [
    	"name" => to.name,
      	"email" => to.email
    ],
  	"from" => [
    	"name" => from.name,
      	"email" => from.email
    ],
  	"message" => [
      	"is_html" => true,
      	"html" => "This is a example notification message.",
    	"plain_text" => "This is a example notification message."
    ]
];
```

#### Twilio Service

[](#twilio-service)

Service IDData Required for Notificationtwilio`ToPhoneNumber, FromSMSName, FromPhoneNumber, MessageSMS `##### Data

[](#data-1)

```
$Notify->ToPhoneNumber = "07704810577";

$Notify->FromSMSName = "Ocuru";
$Notify->FromPhoneNumber = "447733806389"; // Valid Twilio Number with Country Prefix

// Below Message will send with the following format.
// From Ocuru: This is a example notification message.
$Notify->MessageSMS = "This is a example notification message.";
```

Basic Setup
-----------

[](#basic-setup)

Service IDData Required for Notificationtwilio`to.name, to.number, from.name, from.number, message.short`##### Data Format

[](#data-format-1)

```
$data = [
	"to" => [
      	"name" => to.name,
    	"number" => to.number
    ],
  	"from" => [
       	"name" => from.name,
    	"number" => from.number
    ],
  	"message" => [
    	"short" => message.short
    ]
];
```

Basic Setup
-----------

[](#basic-setup-1)

Below is the basic setup you need to run the example code in this document.

```
use Ocuru\Notify\Notify;

$Notify = new Notify;
```

Environmental Variables
-----------------------

[](#environmental-variables)

You need to first set the **.env** file location using the below code. **This is required.**

```
$_ENV['ENV_LOCATION'] = __DIR__; // Directory of which your .env file is located
```

If you haven't already set up your **.env** file , *ocuru/notify* installs *vlucas/phpdotenv* onto the system.

Below is the basic setup of ***Dotenv*** where `$_ENV['ENV_LOCATION']` is the location of your **.env** file.

Place the below code before the ***$Notify*** variable if setup is needed.

```
$dotenv = new Dotenv\Dotenv($_ENV['ENV_LOCATION']);
$dotenv->load();
```

Each service will need a different set some **.env** variables, these are show below.

#### Email

[](#email)

======= To set up each service you will need to set some **.env** variables, these are show below.

#### Email

[](#email-1)

```
Ocuru\Notify\Email.SSL.Verify_Peer=false
Ocuru\Notify\Email.SSL.Verify_Peer_Name=false
Ocuru\Notify\Email.SSL.Allow_Self_Signed=true
Ocuru\Notify\Email.Host=mail.example.com
Ocuru\Notify\Email.SMTPAuth=true
Ocuru\Notify\Email.Username=user@example.com
Ocuru\Notify\Email.Password=secret
Ocuru\Notify\Email.SMTPSecure=tls
Ocuru\Notify\Email.Mailer=smtp
Ocuru\Notify\Email.Port=587
```

#### Twilio

[](#twilio)

```
Ocuru\Notify\Twilio.SID=example_id
Ocuru\Notify\Twilio.Token=example_secret
```

### After Setting *.env* Variables

[](#after-setting-env-variables)

In the below example we show you how to setup the services you want to use. You should only run these methods once you have set up all the environmental variables you need shown [here](#environmental-variables). If you don't then an exception will be thrown.

The array can consist of any of the service names shown in the Service ID part of each service [List of Services](#available-services) area.
============================================================================================================================================

[](#the-array-can-consist-of-any-of-the-service-names-shown-in-the-service-id-part-of-each-service-list-of-services-area)

```
Ocuru\Notify\Twilio.ID=example_id
Ocuru\Notify\Twilio.Secret=example_secret
```

### After Setting *.env* Variables

[](#after-setting-env-variables-1)

In the below example we show you how to setup the services you want to use. You should only run these methods once you have set up all the environmental variables you need shown [here](#environmental-variables). If you don't then an exception will be thrown.

The array can consist of any of the service names shown in square brackets in the [List of Services](#available-services) area.

```
$Notify->use($arrayOfServices);
$Notify->start();
```

The `$Notify->start();` method is required for **Ocuru\\Notify** to initialize. However the `$Notify->use();` method isn't required but if you run `$Notify->start();` without it we will attempt to setup the Email service which is **Ocuru\\Notify**'s default service. If no [Environmental Variables](#environmental-variables) are found for the Email Service then a exception will be thrown.

Notifying Users
---------------

[](#notifying-users)

To notify a user you can use the methods shown below. If an error occurs, we will throw an exception.

Below is the first example of how to send a notification, this sends a notification through all services you have set up.

In order to send a notification you will need to make sure all variables needed for each service are set. You can find out how to do this and what variables are required [here.](#available-services)

```
$Notify->notify();
```

However you can also send via specific services using the same method, all you need to do is pass an array of services as the first parameter. For Example.

```
$Notify->notify($arrayOfServices);
```

The `$Notify->start();` method is required for **Ocuru\\Notify** to initialize. However the `$Notify->use();` method isn't required but if you run `$Notify->start();` without it we will attempt to setup the Email service which is set and Global Default. If no [Environmental Variables](#environmental-variables) are found for the Email Service then a exception will be thrown.

Notifying Users
---------------

[](#notifying-users-1)

To notify a user you can use the methods shown below.

Below is the first example of how to send a notification, this sends a notification through all services you have set up.

```
```

The next example shows you how to send a notification using a specific service. Through the `$Notify->notify($data);` method.

```
```

The final example shows you how to send a notification using the services base **Notify** Method. For example `$Notify->email->notify($data);`

```
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3276d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10922158?v=4)[Lewis Mason](/maintainers/lewismason)[@LewisMason](https://github.com/LewisMason)

---

Top Contributors

[![Ocuru](https://avatars.githubusercontent.com/u/13486641?v=4)](https://github.com/Ocuru "Ocuru (11 commits)")

---

Tags

phpslimnotification

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ocuru-notifyme/health.svg)

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

###  Alternatives

[tomatophp/filament-twilio

Send Whatsapp messages using Twilio and native filament Notification Facade class

112.4k](/packages/tomatophp-filament-twilio)

PHPackages © 2026

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