From 8ef358eac7412a4742c961661fa6c1803af84008 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Thu, 28 Jun 2018 12:42:03 -0400 Subject: [PATCH] Support option of forcing use of core WireMail even when other WireMail modules installed (primarily for testing/debugging purposes) --- wire/core/WireMailTools.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wire/core/WireMailTools.php b/wire/core/WireMailTools.php index 04a7e76c..de5037da 100644 --- a/wire/core/WireMailTools.php +++ b/wire/core/WireMailTools.php @@ -54,7 +54,11 @@ class WireMailTools extends Wire { // see if a WireMail module is specified in $config if(isset($settings['module'])) { - $mail = $modules->get($settings['module']); + if($settings['module'] === 'WireMail') { + $mail = $this->wire(new WireMail()); + } else { + $mail = $modules->get($settings['module']); + } unset($settings['module']); }