mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#2243 보완: use template to generate test email
This commit is contained in:
parent
7f6f949330
commit
3fb44b2863
2 changed files with 16 additions and 3 deletions
|
|
@ -251,9 +251,10 @@ class Advanced_MailerAdminController extends Advanced_Mailer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$oMail = new Rhymix\Framework\Mail();
|
$oMail = new Rhymix\Framework\Mail();
|
||||||
$oMail->setTitle('Advanced Mailer Test : ' . strtoupper($sending_method));
|
$oMail->setTitle('Rhymix Email 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>' .
|
$template = new \Rhymix\Framework\Template($this->module_path . 'tpl', 'test_email.html');
|
||||||
'<p>고급 메일 발송 모듈 <b>테스트</b> 메일입니다.</p><p>메일이 정상적으로 발송되고 있습니다.</p></body></html>');
|
$template->setVars(['sending_method' => $sending_method]);
|
||||||
|
$oMail->setContent($template->compile());
|
||||||
$oMail->addTo($recipient_email, $recipient_name);
|
$oMail->addTo($recipient_email, $recipient_name);
|
||||||
$result = $oMail->send();
|
$result = $oMail->send();
|
||||||
|
|
||||||
|
|
|
||||||
12
modules/advanced_mailer/tpl/test_email.html
Normal file
12
modules/advanced_mailer/tpl/test_email.html
Normal 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>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue