A service for sending email transactions.
The factory method uses MailGun service by default which requires an api key and an endpoint
$service = new \MailService\MailServiceFactory($key, $endpoint);
$service = new \MailService\MailServiceFactory($key, $endpoint);
$service->sendMessage($postData);
Mailguns api is mocked to allow for testing of this services functionality.
vendor/bin/phpunit
Any plugin can be used as long as they implement the MailServiceInterface interface and placed inside the plugin directory.
The plugin can be loaded by setting the plugin variable in the configuration
$config = new Configuration();
$config->plugin = 'MyCustomPlugin';
return new MailService($config);
vendor/bin/phpcbf --standard=psr2 ./src