From bbb1b8c976aaf136b12b5a3c28aa1e419f8a15b7 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 28 Oct 2024 12:37:31 +0100 Subject: [PATCH] using json to load the mail allows to place everything message related in the view (e.g. the subject) --- application/controllers/Options.php | 4 ++-- application/views/email/testmail.php | 8 ++++++-- system/libraries/Email.php | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 5a8cddf1c..443f60d7b 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -374,8 +374,8 @@ class Options extends CI_Controller { $this->email->from($this->optionslib->get_option('emailAddress'), $this->optionslib->get_option('emailSenderName')); $this->email->to($email); - $this->email->subject('Wavelog Test-Mail'); - $this->email->message($message); + $this->email->subject($message['subject']); + $this->email->message($message['body']); if (! $this->email->send()){ $this->session->set_flashdata('testmailFailed', __("Testmail failed. Something went wrong.")); diff --git a/application/views/email/testmail.php b/application/views/email/testmail.php index 60057a877..bb0b4e9e7 100644 --- a/application/views/email/testmail.php +++ b/application/views/email/testmail.php @@ -1,6 +1,8 @@ -