From 3fb44b286318cb03a600a9b1809a1f0fcbd2c5c0 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 30 Dec 2023 22:11:30 +0900 Subject: [PATCH] =?UTF-8?q?#2243=20=EB=B3=B4=EC=99=84:=20use=20template=20?= =?UTF-8?q?to=20generate=20test=20email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../advanced_mailer.admin.controller.php | 7 ++++--- modules/advanced_mailer/tpl/test_email.html | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 modules/advanced_mailer/tpl/test_email.html diff --git a/modules/advanced_mailer/advanced_mailer.admin.controller.php b/modules/advanced_mailer/advanced_mailer.admin.controller.php index 69ea77903..ef6fea4f4 100644 --- a/modules/advanced_mailer/advanced_mailer.admin.controller.php +++ b/modules/advanced_mailer/advanced_mailer.admin.controller.php @@ -251,9 +251,10 @@ class Advanced_MailerAdminController extends Advanced_Mailer try { $oMail = new Rhymix\Framework\Mail(); - $oMail->setTitle('Advanced Mailer Test : ' . strtoupper($sending_method)); - $oMail->setContent('Advanced Mailer Test : '.strtoupper($sending_method).'

This is a test email from Advanced Mailer.

Thank you for trying Advanced Mailer.

' . - '

고급 메일 발송 모듈 테스트 메일입니다.

메일이 정상적으로 발송되고 있습니다.

'); + $oMail->setTitle('Rhymix Email Test : ' . strtoupper($sending_method)); + $template = new \Rhymix\Framework\Template($this->module_path . 'tpl', 'test_email.html'); + $template->setVars(['sending_method' => $sending_method]); + $oMail->setContent($template->compile()); $oMail->addTo($recipient_email, $recipient_name); $result = $oMail->send(); diff --git a/modules/advanced_mailer/tpl/test_email.html b/modules/advanced_mailer/tpl/test_email.html new file mode 100644 index 000000000..de619d750 --- /dev/null +++ b/modules/advanced_mailer/tpl/test_email.html @@ -0,0 +1,12 @@ + + + + Rhymix Email Test : {$sending_method|upper} + + +

라이믹스에서 발송한 테스트 메일입니다.

+

{$sending_method|upper} 발송 방법을 사용하여 정상적으로 발송되고 있습니다.

+

This is a TEST EMAIL from Rhymix.

+

Your email seems to be working fine using {$sending_method|upper}.

+ +