PHP | 네이버 계정메일 발송 PHP 함수
페이지 정보
작성자 관리자 작성일18-01-12 16:48 조회1,026회 댓글0건관련링크
본문
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")
{
global $config;
global $g5;
// 메일발송 사용을 하지 않는다면
if (!$config['cf_email_use']) return;
if ($type != 1)
$content = nl2br($content);
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.naver.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "아이디"; // SMTP username
$mail->Password = "패스워드"; // SMTP password
$mail->From = "네이버 이메일주소";
$mail->FromName = $fname;
$mail->AddAddress($to, $fname);
if ($cc)
$mail->addCC($cc);
if ($bcc)
$mail->addBCC($bcc);
$mail->IsHTML(true); // set email format to HTML
##############################
$_body = $content;
$mail->Subject = $subject;
$mail->Body = "".$_body;
if ($file != "") {
foreach ($file as $f) {
$mail->addAttachment($f['path'], $f['name']);
}
}
return $mail->send();
}
{
global $config;
global $g5;
// 메일발송 사용을 하지 않는다면
if (!$config['cf_email_use']) return;
if ($type != 1)
$content = nl2br($content);
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.naver.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "아이디"; // SMTP username
$mail->Password = "패스워드"; // SMTP password
$mail->From = "네이버 이메일주소";
$mail->FromName = $fname;
$mail->AddAddress($to, $fname);
if ($cc)
$mail->addCC($cc);
if ($bcc)
$mail->addBCC($bcc);
$mail->IsHTML(true); // set email format to HTML
##############################
$_body = $content;
$mail->Subject = $subject;
$mail->Body = "".$_body;
if ($file != "") {
foreach ($file as $f) {
$mail->addAttachment($f['path'], $f['name']);
}
}
return $mail->send();
}
[주소복사] https://www.goodsweb.kr/?u=D41T7ME7
SNS 알리기
핀터레스트
텔레그램로
블로그로
페이스북
트위터
카카오스토리
카톡 공유
관련 블로그
로딩중