Download the PHP package drewlabs/envoyer without Composer
On this page you can find all versions of the php package drewlabs/envoyer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drewlabs/envoyer
More information about drewlabs/envoyer
Files in drewlabs/envoyer
Informations about the package envoyer
Envoyer
Client library for sending text message, email, etc... notification using various adapters / drivers.
Usage
The library requires drivers for supported providers like [ Amazon AWS SES
], [ TWILIO Sendgrid
] driver (for sending mail using [ Twilio Sendgrid PHP API
]), [SMTP] driver (for sending mails using an SMTP connection), [ Twilio Message API
] (For sending Text message using Twilio), and SMPP driver (for sending message using an SMPP connection to an SMPP server), etc.
-- Sending an mail
For simple mail (mail without attachment), there is no need to implements [Drewlabs\Contracts\Notification\AttachmentsNotification] as it is only required for mails with attachments.
- SMTP
-- Integration
composer require drewlabs/envoyer-smtp
-- Sending mail
- Twilio Message API
-- Installation
composer require drewlabs/envoyer-twilio
-- Sending Text Message
- SMPP Server
-- Installation
composer require drewlabs/envoyer-smpp
-- Sending Text messages
- Custom Driver
Custom / Thrird party drivers implementations must implements [Drewlabs\Envoyer\Contracts\ClientInterface] and define the custom logic to send notification.
API
- Mail builder
The mail builder
class is a fluent interface for building mail notifications.
Example:
- Text Messages builder
The text message builder
is a fluent interface for building text messages to be send as notification instance.
- Driver Enum
To avoid typo error for driver names, implementation comes with PHP constant that can be use when contructing command:
- The Drivers registry
The drivers registry
is a singleton class that allow application developper to register and create notification drivers.
Note The factory function/closure passed as parameter to defineDriver
must return an instance of Drewlabs\Envoyer\Contracts\ClientInterface
else the driver resolver will throw an exception.
All versions of envoyer with dependencies
drewlabs/envoyer-contracts Version ^0.2.4
psr/http-message Version ^1.0|^2.0