Skip to content

roundpartner/mail-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Mail Service

A service for sending email transactions.

Initialising

The factory method uses MailGun service by default which requires an api key and an endpoint

$service = new \MailService\MailServiceFactory($key, $endpoint);

Sending Mail

$service = new \MailService\MailServiceFactory($key, $endpoint);
$service->sendMessage($postData);

Testing

Mailguns api is mocked to allow for testing of this services functionality.

vendor/bin/phpunit

Plugins

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);

Clean Code

vendor/bin/phpcbf --standard=psr2 ./src

Releases

No releases published

Packages

No packages published

Languages