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(); // defaults to using php "mail()"
if (defined('G5_SMTP') && G5_SMTP) {
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = G5_SMTP; // SMTP server
if(defined('G5_SMTP_PORT') && G5_SMTP_PORT)
$mail->Port =G5_SMTP_PORT;
}
$mail->CharSet = 'UTF-8';
$mail->Username=$fmail;
$mail->From = $fmail;
$mail->FromName = $fname;
$mail->Subject = $subject;
$mail->AltBody = ""; // optional, comment out and test
$mail->msgHTML($content);
$mail->addAddress($to);
$mail->addAddress($to);
if ($cc)
$mail->addCC($cc);
if ($bcc)
$mail->addBCC($bcc);
//print_r2($file); exit;
if ($file != "") {
foreach ($file as $f) {
$mail->addAttachment($f['path'], $f['name']);
}
}
return $mail->send();
}
제메일로 오게하려하는데 제메일주소를 어느 부분에 쓰는지 모르겠어요
답변 5개 / 댓글 2개
mailer($fname, $fmail, $to="", $subject, $content, $type=0, $file="", $cc="", $bcc="");
각변수에 맞게 값을 넣으셔야져
$fname은 보내는이 이름
$fmail은 보내는이 메일
$to 받는이 메일
$subject 제목
$content 내용
답변을 작성하려면 로그인이 필요합니다.