2025-09-24 06:24:52 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* @link https://www.yiiframework.com/
|
|
|
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
|
|
|
|
* @license https://www.yiiframework.com/license/
|
|
|
|
|
*/
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace yii\symfonymailer;
|
|
|
|
|
|
|
|
|
|
use Symfony\Component\Mime\Crypto\SMimeEncrypter;
|
|
|
|
|
use Symfony\Component\Mime\Message;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @codeCoverageIgnore This class is a trivial proxy that requires no testing
|
|
|
|
|
*/
|
2025-10-03 11:00:05 +00:00
|
|
|
class SMimeMessageEncrypter implements MessageEncrypterInterface
|
2025-09-24 06:24:52 +00:00
|
|
|
{
|
2025-10-03 11:00:05 +00:00
|
|
|
private SMimeEncrypter $encrypter;
|
|
|
|
|
public function __construct(SMimeEncrypter $encrypter)
|
|
|
|
|
{
|
|
|
|
|
$this->encrypter = $encrypter;
|
|
|
|
|
}
|
2025-09-24 06:24:52 +00:00
|
|
|
|
|
|
|
|
public function encrypt(Message $message): Message
|
|
|
|
|
{
|
|
|
|
|
return $this->encrypter->encrypt($message);
|
|
|
|
|
}
|
|
|
|
|
}
|