반응형
base64_encode ! 설정해줘야됨
function mailsend_func($email,$contents){
$wtime = date("y-m-d h:i:s",$wtime);
$mailTo = $email; // 받는 메일 주소;
$mailFrom = "발송이메일";
$subject = "제목.";
$mailTo = $email; // 받는 메일 주소;
$mailFrom = "발송이메일";
$subject = "제목.";
$mailSubject .= "=?utf-8?B?".base64_encode($subject)."?=\r\n";
$mailContent = stripslashes($contents);
$headers = "From: $mailFrom\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
$mailHeader = $headers;
$mailResult = mail ($mailTo, $mailSubject, $mailContent, $mailHeader,'-f'.$mailFrom);
}
// Complete Mail
$headers = "From: $mailFrom\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
$mailHeader = $headers;
$mailResult = mail ($mailTo, $mailSubject, $mailContent, $mailHeader,'-f'.$mailFrom);
}
// Complete Mail
$content_success=" 메일 내용 ";
mailsend_func($email,$content_success);
반응형
'프로그램 > PHP' 카테고리의 다른 글
php 비밀번호 랜덤 생성 (0) | 2018.09.27 |
---|---|
php smtp 관련 ssl 포트 사용 가능한지 체크 (0) | 2018.09.27 |
php file_get_content('php://input'); (0) | 2018.09.27 |
데이터 엑셀 출력시 셀 서식 정하기 (0) | 2016.01.13 |
댓글