폼메일(그누보드 5.3)
기존 https://sir.kr/g5_skin/19820 스킨 디자인을 그누보드 5.3버전으로 변경했습니다.
사용방법은 그누보드 설치경로에 업로드 하신후 http://localhost/formmail/formmail.php 형식으로 호출하시면 됩니다.
설정은 /formmail/php/config.inc.php파일의 설정들 수정 후 사용하시면 됩니다.
[code]
<?php
// USE SMTP OR mail()
// SMTP is recommended, mail() is disabled on most shared hosting servers.
// IF false : SMTP host/port/user/pass/ssl not used, leave empty or as it is!
$config['use_smtp'] = true; // true|false
// SMTP Server Settings
$config['smtp_host'] = 'smtp.naver.com'; // eg.: smtp.mandrillapp.com
$config['smtp_port'] = 465; // eg.: 587
$config['smtp_user'] = '********@naver.com'; // you@gmail.com
$config['smtp_pass'] = '********'; // password
$config['smtp_ssl'] = true; // true for google (port 465), false for others
// Who receive all emails?
$config['send_to'] = '********@naver.com'; // destination of all emails sent throught contact form
// Email Subject
$config['subject'] = 'Company Contact Form'; // subject of emails you receive
?>
[/code]
첨부파일
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기
댓글 47개
항상 수고가 많으십니다.
죄송하지만 첨부화일은 어떻게 적용 하는지 알 수 있을까요?
형식으로 호출하시면 됩니다.
화일도 첨부해 보내는 방법을 여쭤 보았던것입니다. ;; 죄송하지만 대략적이라도 방법을 알 수 있을까요?;;
이것 저것 적용해 보았지만 화일첨부 발송은 잘 되질 않네요 ㅜㅜ
phpmailer을 검색해보시는것이 좋을것같습니다.
개발쪽 내용을 하나도 몰라 조금 헤매긴 했는데, 그래도 잘 적용되어서 옵니다! ㅠㅠ!
<?php
// USE SMTP OR mail()
// SMTP is recommended, mail() is disabled on most shared hosting servers.
// IF false : SMTP host/port/user/pass/ssl not used, leave empty or as it is!
$config['use_smtp'] = true; // true|false
// SMTP Server Settings
$config['smtp_host'] = 'smtp.daum.net'; // eg.: smtp.mandrillapp.com
$config['smtp_port'] = 465; // eg.: 587
$config['smtp_user'] = '********@daum.net'; // you@gmail.com
$config['smtp_pass'] = '******'; // password
$config['smtp_ssl'] = true; // true for google (port 465), false for others
// Who receive all emails?
// $config['send_to'] = '*******@daum.com'; // destination of all emails sent throught contact form
$dept = $_POST['subject'];
if($dept == '생활용품') {
$config['send_to'] = '********@naver.com';
} else if($dept == '물관련제품') {
$config['send_to'] = '*************@naver.com';
} else if($dept == '신규개발관련') {
$config['send_to'] = '***********@nate.com';
}
// Email Subject
$config['subject'] = 'Company Contact Form'; // subject of emails you receive
?>
받는사람이 이렇게 나오는건 어떤 문제인가요?
먼저 감사드립니다!
한가지 문의사항이 있는데요.
http://localhost/formmail/formmail.php 경로가 아닌 main.php에
<?php include_once('./formmail/formmail.php'); ?>로 가져와서 메일을 보낼 수는 없을까요??
메인페이지로 include 하여 전송버튼 누르니 contact.js $.ajax 부분 error에 걸려 "Server Internal Error" 메세지가 출력 됩니다 ㅠ
답변 부탁드릴게요