XE 회원 가입등 이메일 발송은 고급메일 발송 모듈로 잘 전송 되고 있습니다.
아래와 같이 PHP 파일을 생성해, 메일을 발송하면 고급메일발송모듈을 이용하지 않고 발송/에러 기록도 남지 않습니다.
http://domain/xe/mailtest.php
사용법을 알려 주시면 감사드리겠습니다.
<?php
ini_set('max_execution_time', 600);
define('__XE__', TRUE);
define('__ZBXE__', TRUE);
require_once('../../../config/config.inc.php');
$oContext = &Context::getInstance();
$oContext->init();
/*
XE 메일 발송
*/
$oMail = new Mail();
$oMail->setContentType("html");
$oMail->setReceiptor("name","recv@rcpt.com");
$oMail->setTitle("hello title");
$oMail->setContent("hello content");
$oMail->setSender("sender", "sender@send.com");
$oMail->send();
?>
ini_set('max_execution_time', 600);
define('__XE__', TRUE);
define('__ZBXE__', TRUE);
require_once('../../../config/config.inc.php');
$oContext = &Context::getInstance();
$oContext->init();
/*
XE 메일 발송
*/
$oMail = new Mail();
$oMail->setContentType("html");
$oMail->setReceiptor("name","recv@rcpt.com");
$oMail->setTitle("hello title");
$oMail->setContent("hello content");
$oMail->setSender("sender", "sender@send.com");
$oMail->send();
?>
댓글 2
일반적인 XE 모듈 요청이 아닌 별도의 파일에서 고급 메일 발송 모듈을 사용하려면 Context->init() 직후에 아래의 한 줄을 추가하여 트리거를 호출해 주시면 됩니다.
getModel('advanced_mailer')->triggerReplaceMailClass();
이런 방법으로 많이들 사용하지 않으시겠지만 고급 메일 발송 모듈 github에 설명이 추가 되면 좋겠습니다.
감사합니다.