merge master in prod
This commit is contained in:
@@ -59,6 +59,11 @@ class TestEmailCommand extends ConsoleCommand
|
||||
*/
|
||||
protected function serve()
|
||||
{
|
||||
// TODO: remove when requiring Grav 1.7+
|
||||
if (method_exists($this, 'initializeGrav')) {
|
||||
$this->initializeThemes();
|
||||
}
|
||||
|
||||
$grav = Grav::instance();
|
||||
|
||||
$this->output->writeln('');
|
||||
@@ -69,8 +74,6 @@ class TestEmailCommand extends ConsoleCommand
|
||||
|
||||
$this->output->writeln('');
|
||||
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
$grav['Email'] = new Email();
|
||||
|
||||
$to = $this->input->getOption('to') ?: $grav['config']->get('plugins.email.to');
|
||||
@@ -86,8 +89,6 @@ class TestEmailCommand extends ConsoleCommand
|
||||
$body = $grav['language']->translate(['PLUGIN_EMAIL.TEST_EMAIL_BODY', $configuration]);
|
||||
}
|
||||
|
||||
// This is the old way....
|
||||
// $sent = EmailUtils::sendEmail($subject, $body, $email_to);
|
||||
$sent = EmailUtils::sendEmail(['subject'=>$subject, 'body'=>$body, 'to'=>$to]);
|
||||
|
||||
if ($sent) {
|
||||
|
||||
Reference in New Issue
Block a user