글작성후 메일발송할때 이미지도 같이발송할려고합니다.

글작성후 메일발송할때 이미지도 같이발송할려고합니다.

QA

글작성후 메일발송할때 이미지도 같이발송할려고합니다.

본문

<div style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto'><img style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto' src='홈페이지주소/".$dest_file."'></div>
</div>

여기에서 두번째파일만 출력하고 싶은데요.

각각 첨부파일을 표시할려면 어떻게 해야될까요?

 

 


<?
 include_once(G5_LIB_PATH.'/mailer.lib.php');
 
if($_POST['wr_5']){
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$sql = " select bf_source, bf_file from $g5[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no asc";
$file_result = sql_query($sql);
$files = Array();
while($file = sql_fetch_array($file_result)){
   $dest_file = '/data/file/'.$bo_table.'/'.$file['bf_file'];
   $files[] = array("name" => $file['bf_source'], "path" => $dest_file);
}
mailer('관리자', '*** 개인정보보호를 위한 이메일주소 노출방지 ***', $wr[wr_6] , "[관리자] ".$wr[wr_name]."님의 문의입니다." , "
<div style='background:#f7f7f7; width:1200px; height:720px; padding:0px 30px 20px 30px;border-radius:20px;'>
<div style='float:left;width:450px;padding:0;height:100%;margin:20px 0 20px 0px'>
<div style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto'><img style='margin-bottom:20px;border-radius:20px;max-width:100%;height:auto' src='홈페이지주소/".$dest_file."'></div>
</div>

이 질문에 댓글 쓰기 :

답변 1

두번째 파일만

$sql = " select bf_source, bf_file from $g5[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no asc";

->

$sql = " select bf_source, bf_file from $g5[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no asc limit 1, 1";

 

$sql = " select bf_source, bf_file from $g5[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' order by bf_no asc"; // 원래대로
~

while($file = sql_fetch_array($file_result)){
  $dest_file[] = '/data/file/'.$bo_table.'/'.$file['bf_file'];
  $files[] = array("name" => $file['bf_source'], "path" => $dest_file);
}

첨부파일 1 : $dest_file[0]
첨부파일 2 : $dest_file[1]
첨부파일 3 : $dest_file[2]

or

for ($i = 0; $i < count($dest_file); $i++) {
  echo '첨부파일' . $i . ' : ' . $dest_file[$i];
}

궁금한 사항이 하나 더있어서요. 첨부파일은 잘 발송이되는데요. 네이버 / 다음 메일에서는 이미지가 액박이되면서 불러오지를 못하는데 이부분은 어떻게 해야될까요? 구글(gamil)만 정상적으로 이미지가 보여지거든요

답변을 작성하시기 전에 로그인 해주세요.
전체 51
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT