diff --git a/src/Lib/ToolResolver.php b/src/Lib/ToolResolver.php index 5e4990b..5f1227d 100644 --- a/src/Lib/ToolResolver.php +++ b/src/Lib/ToolResolver.php @@ -17,6 +17,7 @@ namespace Pimcore\Bundle\StaticResolverBundle\Lib; use Exception; +use Pimcore\Mail; use Pimcore\Tool; final class ToolResolver implements ToolResolverInterface @@ -38,4 +39,12 @@ public function getDefaultLanguage(): ?string { return Tool::getDefaultLanguage(); } + + /** + * @throws Exception + */ + public function getMail(array|string $recipients = null, string $subject = null): Mail + { + return Tool::getMail($recipients, $subject); + } } diff --git a/src/Lib/ToolResolverInterface.php b/src/Lib/ToolResolverInterface.php index ea30577..1c31f6b 100644 --- a/src/Lib/ToolResolverInterface.php +++ b/src/Lib/ToolResolverInterface.php @@ -16,11 +16,22 @@ namespace Pimcore\Bundle\StaticResolverBundle\Lib; +use Exception; +use Pimcore\Mail; + interface ToolResolverInterface { public function getValidLanguages(): array; + /** + * @throws Exception + */ public function getSupportedLocales(): array; public function getDefaultLanguage(): ?string; + + /** + * @throws Exception + */ + public function getMail(array|string $recipients = null, string $subject = null): Mail; }