bcismariu / greenarrow-php
Simple PHP wrapper for GreenArrow's sending email API
Installs: 1 687
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- guzzlehttp/guzzle: ~6.0
- php-http/guzzle6-adapter: ^1.1
Requires (Dev)
- mockery/mockery: >=0.9.4
This package is auto-updated.
Last update: 2024-10-13 06:00:06 UTC
README
Installation
Update your composer.json
file
{ "require": { "bcismariu/greenarrow-php": "0.*" } }
Run composer update
Usage
use Bcismariu\GreenArrow\GreenArrow; use GuzzleHttp\Client; use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $mailer = new GreenArrow(new GuzzleAdapter(new Client()), [ 'username' => 'username', 'password' => 'password', ]); $mailer->send([ 'message' => [ 'to' => [[ 'name' => 'John Smith', 'email' => 'john.smith@example.com' ]], 'from_name' => 'Jane Doe', 'from_email' => 'jane.doe@example.com', 'subject' => 'A simple subject', 'html' => '<h1>A simple html body</h1>', ], ]);
Contributions
This is a very basic implementation that can only handle basic calls. Any project contributions are welcomed!