#2243 보완: use template to generate test email

This commit is contained in:
Kijin Sung 2023-12-30 22:11:30 +09:00
parent 7f6f949330
commit 3fb44b2863
2 changed files with 16 additions and 3 deletions

View file

@ -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('<!DOCTYPE html><html lang="ko"><head><title>Advanced Mailer Test : '.strtoupper($sending_method).'</title></head><body><p>This is a <b>test email</b> from Advanced Mailer.</p><p>Thank you for trying Advanced Mailer.</p>' .
'<p>고급 메일 발송 모듈 <b>테스트</b> 메일입니다.</p><p>메일이 정상적으로 발송되고 있습니다.</p></body></html>');
$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();

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<title>Rhymix Email Test : {$sending_method|upper}</title>
</head>
<body>
<p>라이믹스에서 발송한 <b>테스트 메일</b>입니다.</p>
<p><em>{$sending_method|upper}</em> 발송 방법을 사용하여 정상적으로 발송되고 있습니다.</p>
<p>This is a <b>TEST EMAIL</b> from Rhymix.</p>
<p>Your email seems to be working fine using <em>{$sending_method|upper}</em>.</p>
</body>
</html>