diff --git a/app/config/conf.local.sample.yml b/app/config/conf.local.sample.yml index 8fa5619..8792856 100644 --- a/app/config/conf.local.sample.yml +++ b/app/config/conf.local.sample.yml @@ -11,6 +11,9 @@ database: dbname: httpcb charset: utf8 +#sendgrid + #key: value + # OAuth #oauth: #providers: diff --git a/app/config/services.php b/app/config/services.php index c062c68..7271114 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -224,6 +224,10 @@ $di->setShared('db', function () use ($di, $config) { return $db; }); +$di->setShared('sendgrid', function() use ($config) { + return new SendGrid($config->sendgrid->key); +}); + $di->setShared('eventsManager', function () { $activityLog = new ActivityLog(); diff --git a/composer.json b/composer.json index 955c3ff..481a621 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "league/oauth2-github": "^2.0", "league/oauth2-google": "^2.2", "omines/oauth2-gitlab": "^3.1", - "localheinz/json-printer": "^2.0" + "localheinz/json-printer": "^2.0", + "sendgrid/sendgrid": "^7.0" } } diff --git a/composer.lock b/composer.lock index 8031bbd..18c64ec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "5b02615c35e5c720f8fc96266a7f87a3", - "content-hash": "1e872347d68f7521be008e5a53d4b5e4", + "hash": "cb468603a22f2d265e74e0e1cb692ca1", + "content-hash": "f519b8b85514afd2d01426a06e3bea02", "packages": [ { "name": "guzzlehttp/guzzle", @@ -687,6 +687,113 @@ ], "time": "2017-12-23 06:48:51" }, + { + "name": "sendgrid/php-http-client", + "version": "3.9.6", + "source": { + "type": "git", + "url": "https://github.com/sendgrid/php-http-client.git", + "reference": "e9a04d949ee2d19938ab83dc100933a3b41a8ec7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sendgrid/php-http-client/zipball/e9a04d949ee2d19938ab83dc100933a3b41a8ec7", + "reference": "e9a04d949ee2d19938ab83dc100933a3b41a8ec7", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~4.4", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "SendGrid\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Bernier", + "email": "dx@sendgrid.com" + }, + { + "name": "Elmer Thomas", + "email": "elmer@thinkingserious.com" + } + ], + "description": "HTTP REST client, simplified for PHP", + "homepage": "http://github.com/sendgrid/php-http-client", + "keywords": [ + "api", + "fluent", + "http", + "rest", + "sendgrid" + ], + "time": "2018-04-10 18:06:08" + }, + { + "name": "sendgrid/sendgrid", + "version": "7.0.0", + "source": { + "type": "git", + "url": "https://github.com/sendgrid/sendgrid-php.git", + "reference": "b659d96f19f69bcef6807300f88ac7a1b2449328" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sendgrid/sendgrid-php/zipball/b659d96f19f69bcef6807300f88ac7a1b2449328", + "reference": "b659d96f19f69bcef6807300f88ac7a1b2449328", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6", + "sendgrid/php-http-client": "~3.9" + }, + "replace": { + "sendgrid/sendgrid-php": "*" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.9 || ^6.4.3", + "squizlabs/php_codesniffer": "3.*", + "swaggest/json-diff": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "SendGrid\\": "lib/", + "SendGrid\\Mail\\": "lib/mail/", + "SendGrid\\Contacts\\": "lib/contacts/", + "SendGrid\\Stats\\": "lib/stats/" + }, + "files": [ + "lib/SendGrid.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "This library allows you to quickly and easily send emails through SendGrid using PHP.", + "homepage": "http://github.com/sendgrid/sendgrid-php", + "keywords": [ + "email", + "grid", + "send", + "sendgrid" + ], + "time": "2018-05-19 16:38:14" + }, { "name": "symfony/config", "version": "v3.4.6",