php 5.3 버전 이하에서 메일을 보낼수 없는 오류 수정 및 HOOK 이벤트 추가
This commit is contained in:
@ -18,10 +18,13 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc=
|
|||||||
|
|
||||||
$result = run_replace('mailer', $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc);
|
$result = run_replace('mailer', $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc);
|
||||||
|
|
||||||
if( isset($result['return']) ){
|
if( is_array($result) && isset($result['return']) ){
|
||||||
return $result['return'];
|
return $result['return'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mail_send_result = false;
|
||||||
|
|
||||||
|
try {
|
||||||
$mail = new PHPMailer(); // defaults to using php "mail()"
|
$mail = new PHPMailer(); // defaults to using php "mail()"
|
||||||
if (defined('G5_SMTP') && G5_SMTP) {
|
if (defined('G5_SMTP') && G5_SMTP) {
|
||||||
$mail->IsSMTP(); // telling the class to use SMTP
|
$mail->IsSMTP(); // telling the class to use SMTP
|
||||||
@ -46,7 +49,17 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc=
|
|||||||
$mail->addAttachment($f['path'], $f['name']);
|
$mail->addAttachment($f['path'], $f['name']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $mail->send();
|
|
||||||
|
$mail = run_replace('mail_options', $mail, $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc);
|
||||||
|
|
||||||
|
$mail_send_result = $mail->send();
|
||||||
|
|
||||||
|
} catch (Exception $e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
run_event('mail_send_result', $mail_send_result, $mail, $to, $cc, $bcc);
|
||||||
|
|
||||||
|
return $mail_send_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 파일을 첨부함
|
// 파일을 첨부함
|
||||||
|
|||||||
Reference in New Issue
Block a user