This WordPress bundle configures the standalone snicco/better-wp-mail
library for usage in applications based on snicco/kernel
.
composer install snicco/better-wp-mail-bundle
See config/mail.php for the available configuration options.
If this file does not exist in your configuration directory the default configuration will be copied the first time the kernel is booted in dev mode.
Add the BetterWPMailBundle
to your bundles.php
configuration file.
<?php
// /path/to/configuration/bundles.php
use Snicco\Bundle\BetterWPMail\BetterWPMailBundle;
return [
'bundles' => [
Snicco\Component\Kernel\ValueObject\Environment::ALL => [
BetterWPMailBundle::class
]
]
];
You can now lazily resolve a Mailer
from the booted kernel.
use Psr\EventDispatcher\EventDispatcherInterface;
use Snicco\Component\BetterWPHooks\EventMapping\EventMapper;
use Snicco\Component\BetterWPMail\Mailer;
use Snicco\Component\EventDispatcher\EventDispatcher;
/**
* @var Kernel $kernel
*/
$kernel->boot();
$mailer = $kernel->container()->make(Mailer::class);
This repository is a read-only split of the development repo of the Snicco project.
This is how you can contribute.
Please report issues in the Snicco monorepo.
If you discover a security vulnerability within BetterWPCache, please follow our disclosure procedure.