Add dummy driver and other transports supported by Advanced Mailer

This commit is contained in:
Kijin Sung 2016-05-15 19:56:28 +09:00
parent 0b20f3f5c7
commit ebb1b2fd4a
6 changed files with 248 additions and 1 deletions

View file

@ -0,0 +1,32 @@
<?php
namespace Rhymix\Framework\Drivers\Mail;
/**
* The SendGrid mail driver.
*/
class SendGrid extends SMTP implements \Rhymix\Framework\Drivers\MailInterface
{
/**
* Direct invocation of the constructor is not permitted.
*/
protected function __construct(array $config)
{
$config['smtp_host'] = 'smtp.sendgrid.net';
$config['smtp_port'] = 465;
$config['smtp_security'] = 'ssl';
$config['smtp_user'] = $config['api_user'];
$config['smtp_pass'] = $config['api_pass'];
parent::__construct($config);
}
/**
* Get the list of configuration fields required by this mail driver.
*
* @return array
*/
public static function getRequiredConfig()
{
return array('api_user', 'api_pass');
}
}