CI 묻고 답하기

제목 이메일 첨부파일 문의
카테고리 CI 2, 3
글쓴이 perfume 작성시각 2019/12/12 04:57:10
댓글 : 1 추천 : 0 스크랩 : 0 조회수 : 14855   RSS

http://www.ciboard.co.kr/user_guide/kr/libraries/email.html

에 나와있는데로

$this->email->attach( 'http://www.example.com/attach.jpg', 'attachment', '첨부파일' );

이렇게 했는데 메일은 가는데 파일이 첨부가 안됩니다.

 

이메일 설정은

$config['protocol'] = 'smtp';

$config['smtp_host'] = 'ssl://smtp.naver.com';

$config['smtp_user'] = 'aaaa@naver.com';

$config['smtp_pass'] = '*****';

$config['smtp_port'] = 465;

$config['smtp_timeout'] = 5;

$config['wrapchars'] = 76;

$config['charset'] = 'utf-8';

$config['validate'] = FALSE;

$config['priority'] = 3;

$config['crlf'] = "\r\n";

$config['newline'] = "\r\n";

$config['bcc_batch_mode'] = FALSE;

$config['bcc_batch_size'] = 200;

$config['mailtype'] = 'html';

$config['wordwrap'] = TRUE;

이렇게 했습니다.

 

어디를 확인해야 할까요?

 

 다음글 어제의 에러는 mod_rewrite모듈이 없어서 일어난... (7)
 이전글 코드이그나이터 2.2.6 쓰고있습니다. URL인식 질문... (2)

댓글

변종원(웅파) / 2019/12/12 10:08:34 / 추천 0

첨부파일은 https://www.php.net/manual/en/function.stream-get-contents.php 이 함수를 사용하는데

서버환경이 저 함수를 사용할 수 있는지 체크해보세요. 에러메세지 확인해보시면 있을 겁니다.

서버에 있는 파일을 첨부해서 보냈을 때 정상적으로 가면 위 문제입니다.