diff options
author | nornholdj <nornholdj@gmail.com> | 2014-11-14 16:25:36 -0500 |
---|---|---|
committer | nornholdj <nornholdj@gmail.com> | 2014-11-14 16:25:36 -0500 |
commit | 2ca3b8764d9e7ad8c7436e53b6676e9eb6591f28 (patch) | |
tree | 6934c8cf3d9c91852a76e57314246e17c81b4f80 /lib/SendGridCompatibility/SendGrid.php | |
parent | 39f2699a7e7850397882a6d2ee3a8438a105b72d (diff) | |
parent | 3095de0dca14565911a2bdcc1ee5960e63b9b1f4 (diff) | |
download | php-sparkpost-2ca3b8764d9e7ad8c7436e53b6676e9eb6591f28.zip php-sparkpost-2ca3b8764d9e7ad8c7436e53b6676e9eb6591f28.tar.gz php-sparkpost-2ca3b8764d9e7ad8c7436e53b6676e9eb6591f28.tar.bz2 |
Merge branch 'feature/MA-1084' into develop
Diffstat (limited to 'lib/SendGridCompatibility/SendGrid.php')
-rw-r--r-- | lib/SendGridCompatibility/SendGrid.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/SendGridCompatibility/SendGrid.php b/lib/SendGridCompatibility/SendGrid.php new file mode 100644 index 0000000..a85337a --- /dev/null +++ b/lib/SendGridCompatibility/SendGrid.php @@ -0,0 +1,22 @@ +<?php +namespace SparkPost\SendGridCompatibility; + +use SparkPost\Transmission; +use SparkPost\SendGridCompatibility\Email; +use SparkPost\Configuration; + +class SendGrid{ + public function __construct($username, $password, $options = null) { + //username isn't used in our system + $opts = array('key'=>$password); + if (!is_null($options)) { + $opts = array_merge($opts, $options); + } + Configuration::setConfig($opts); + } + + public function send(Email $email) { + Trasmission::send($email->toSparkPostTransmission()); + } +} +?>
\ No newline at end of file |