@@ -1532,7 +1532,7 @@ encrypter that automatically applies to all outgoing messages:
1532
1532
framework :
1533
1533
mailer :
1534
1534
smime_encrypter :
1535
- repository : app.my_smime_encrypter
1535
+ repository : App\Security\LocalFileCertificateRepository
1536
1536
1537
1537
.. code-block :: xml
1538
1538
@@ -1549,7 +1549,7 @@ encrypter that automatically applies to all outgoing messages:
1549
1549
<framework : config >
1550
1550
<framework : mailer >
1551
1551
<framework : smime-encrypter >
1552
- <framework : repository >app.my_smime_encrypter </framework : repository >
1552
+ <framework : repository >App\Security\LocalFileCertificateRepository </framework : repository >
1553
1553
</framework : smime-encrypter >
1554
1554
</framework : mailer >
1555
1555
</framework : config >
@@ -1558,17 +1558,20 @@ encrypter that automatically applies to all outgoing messages:
1558
1558
.. code-block :: php
1559
1559
1560
1560
// config/packages/mailer.php
1561
+ use App\Security\LocalFileCertificateRepository;
1561
1562
use Symfony\Config\FrameworkConfig;
1562
1563
1563
1564
return static function (FrameworkConfig $framework): void {
1564
1565
$mailer = $framework->mailer();
1565
1566
$mailer->smimeEncrypter()
1566
- ->repository('app.my_smime_encrypter' )
1567
+ ->repository(LocalFileCertificateRepository::class )
1567
1568
;
1568
1569
};
1569
1570
1570
- The ``repository `` option must be a service ID that implements
1571
- :class: `Symfony\\ Component\\ Mailer\\ EventListener\\ SmimeCertificateRepositoryInterface `::
1571
+ The ``repository `` option is the ID of a service that implements
1572
+ :class: `Symfony\\ Component\\ Mailer\\ EventListener\\ SmimeCertificateRepositoryInterface `.
1573
+ This interface requires only one method: ``findCertificatePathFor() ``, which must
1574
+ return the file path to the certificate associated with the given email address::
1572
1575
1573
1576
namespace App\Security;
1574
1577
@@ -1591,7 +1594,6 @@ The ``repository`` option must be a service ID that implements
1591
1594
}
1592
1595
}
1593
1596
1594
-
1595
1597
.. versionadded :: 7.3
1596
1598
1597
1599
Global message encryption configuration was introduced in Symfony 7.3.
0 commit comments