멀티 폼메일 재질문
본문
안녕하세요.
mailer 로 발송시 수신자를 추가하려하는데
,로 연결시 수신이 안되어 재문의드립니다.
$to = '메일1,메일2,메일3'; 으로 설정하였는데 수신이 안되네요..
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
$email_enc = new str_encrypt();
//$to = $email_enc->decrypt($to);
$file = array();
for ($i=1; $i<=$attach; $i++) {
if ($_FILES['file'.$i]['name'])
$file[] = attach_file($_FILES['file'.$i]['name'], $_FILES['file'.$i]['tmp_name']);
}
$content = stripslashes($content);
if ($type == 2) {
$type = 1;
$content = str_replace("\n", "<br>", $content);
}
@mailer($fname, $fmail, $to, $subject, $message, $type, $file);
// 임시 첨부파일 삭제
if(!empty($file)) {
foreach($file as $f) {
@unlink($f['path']);
}
}
//$html_title = $tmp_to . "님께 메일발송";
$html_title = '메일 발송중';
include_once(G5_PATH.'/head.sub.php');
if($apply){
alert('이력서가 접수 되었습니다',G5_BBS_URL.'/board.php?bo_table=apply');
}else if($qa){
alert('메일을 정상적으로 발송하였습니다.',G5_URL.'/qa.php');
}else if($qa_en){
alert('메일을 정상적으로 발송하였습니다.',G5_URL.'/qa_en.php');
}else{
alert('메일을 정상적으로 발송하였습니다.',G5_URL.'/map.php');
}
include_once(G5_PATH.'/tail.sub.php');
?>
답변 1
$tos = explode(',' $to);
for($i=0;$i<count($tos);$i++)
{
@mailer($fname, $fmail, $tos[$i], $subject, $message, $type, $file);
}
이런식으로 하시면 되지 않을까요?
!-->
답변을 작성하시기 전에 로그인 해주세요.