mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
40 lines
873 B
PHP
40 lines
873 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Flarum.
|
|
*
|
|
* For detailed copyright and license information, please view the
|
|
* LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Flarum\Mail;
|
|
|
|
use Flarum\Settings\SettingsRepositoryInterface;
|
|
use Illuminate\Contracts\Validation\Factory;
|
|
use Illuminate\Support\MessageBag;
|
|
use Swift_SendmailTransport;
|
|
use Swift_Transport;
|
|
|
|
class SendmailDriver implements DriverInterface
|
|
{
|
|
public function availableSettings(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
public function validate(SettingsRepositoryInterface $settings, Factory $validator): MessageBag
|
|
{
|
|
return new MessageBag;
|
|
}
|
|
|
|
public function canSend(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function buildTransport(SettingsRepositoryInterface $settings): Swift_Transport
|
|
{
|
|
return new Swift_SendmailTransport;
|
|
}
|
|
}
|