mrjulio/rapture-message

Rapture message component

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/mrjulio/rapture-message

v1.0.1 2017-11-18 20:57 UTC

This package is not auto-updated.

Last update: 2025-10-04 20:13:40 UTC


README

PhpVersion License

Message sending for various services.

Requirements

  • PHP v7.0.0
  • php-curl, php-json, php-soap

Install

composer require mrjulio/rapture-message

Quick start

$message= new Message([
    'subject'   =>  'Hello',
    'body'      =>  'Lorem ipsum...'
]);
$message->setSender('no-reply@gmail.com');

$mailgun = new Mailgun(['api-key' => '98asd0as09ds']);
$request = $mailgun->getRequest($message);
$client  = new \Rapture\Http\Client;

$response = $httpClient->sendRequest($request);

if ($response->getStatusCode() === \Rapture\Http\Response::STATUS_OK) {
    echo 'Success!';
}
else {
    echo 'Failed!';
}

About

Author

Iulian N. rapture@iuliann.ro

Testing

cd ./test && phpunit

License

Rapture PHP Message is licensed under the MIT License - see the LICENSE file for details.