mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
34 lines
903 B
PHP
34 lines
903 B
PHP
<?php
|
|
|
|
namespace Kanboard\ServiceProvider;
|
|
|
|
use Kanboard\Core\Mail\Client as EmailClient;
|
|
use Pimple\Container;
|
|
use Pimple\ServiceProviderInterface;
|
|
|
|
/**
|
|
* Mail Provider
|
|
*
|
|
* @package Kanboard\ServiceProvider
|
|
* @author Frederic Guillot
|
|
*/
|
|
class MailProvider implements ServiceProviderInterface
|
|
{
|
|
/**
|
|
* Registers services on the given container.
|
|
*
|
|
* @param Container $container
|
|
*/
|
|
public function register(Container $container)
|
|
{
|
|
$container['emailClient'] = function ($container) {
|
|
$mailer = new EmailClient($container);
|
|
$mailer->setTransport('smtp', '\Kanboard\Core\Mail\Transport\Smtp');
|
|
$mailer->setTransport('sendmail', '\Kanboard\Core\Mail\Transport\Sendmail');
|
|
$mailer->setTransport('mail', '\Kanboard\Core\Mail\Transport\Mail');
|
|
return $mailer;
|
|
};
|
|
|
|
return $container;
|
|
}
|
|
}
|