Reorganize mail driver class structure and add SES driver

This commit is contained in:
Kijin Sung 2016-05-06 21:31:04 +09:00
parent a12722ad79
commit 0420361349
8 changed files with 189 additions and 90 deletions

View file

@ -5,37 +5,13 @@ namespace Rhymix\Framework\Drivers\Mail;
/**
* The SparkPost mail driver.
*/
class SparkPost implements \Rhymix\Framework\Drivers\MailInterface
class SparkPost extends Base implements \Rhymix\Framework\Drivers\MailInterface
{
/**
* The configuration is stored here.
*/
protected $_config = null;
/**
* The API URL.
*/
protected static $_url = 'https://api.sparkpost.com/api/v1/transmissions';
/**
* Direct invocation of the constructor is not permitted.
*/
protected function __construct(array $config)
{
$this->_config = $config;
}
/**
* Create a new instance of the current mail driver, using the given settings.
*
* @param array $config
* @return void
*/
public static function getInstance(array $config)
{
return new self($config);
}
/**
* Check if the current mail driver is supported on this server.
*