config 설정 방식을 함수를 이용하도록 변경
This commit is contained in:
+3
-18
@@ -1,30 +1,15 @@
|
||||
<?php
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.W.E_LIB.W.'phpmailer5/class.phpmailer.php');
|
||||
require_once(ROOT.W.E_LIB.W.'phpmailer5/class.smtp.php');
|
||||
require_once(__dir__.'/../d_setting/conf.php');
|
||||
|
||||
class _Mail {
|
||||
private $objMail;
|
||||
|
||||
public function __construct($host, $port, $id, $pw, $addr) {
|
||||
$this->objMail = new PHPMailer();
|
||||
$this->objMail->IsSMTP();
|
||||
$this->objMail->SMTPAuth = false;
|
||||
//$this->objMail->SMTPSecure = 'ssl';//TODO 제대로된 Mailer 옵션 설정
|
||||
$this->objMail->Host = $host;
|
||||
$this->objMail->Port = $port;
|
||||
$this->objMail->Username = $id;
|
||||
$this->objMail->Password = $pw;
|
||||
public function __construct() {
|
||||
$this->objMail = newMailObj();
|
||||
$this->objMail->ContentType = 'text/plain';
|
||||
$this->objMail->CharSet = 'utf-8';
|
||||
$this->objMail->Encoding = 'base64';
|
||||
$this->objMail->SetFrom($addr);
|
||||
$this->objMail->SMTPOptions = array (
|
||||
'ssl' => array(
|
||||
'verify_peer' => false,
|
||||
'allow_self_signed' => true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function Send($to, $subject, $content) {
|
||||
|
||||
Reference in New Issue
Block a user