CI 묻고 답하기

제목 코드이그나이터 이메일 전송 질문입니다 ㅠ
글쓴이 neo천 작성시각 2015/01/08 12:07:45
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 15173   RSS
$result = "fail실패냥";
        $this->load->library('email');
        
      $config = array();
        $config['useragent']           = "CodeIgniter";
        $config['mailpath']            = "/usr/bin/sendmail"; 
        $config['protocol']            = "smtp";
        $config['smtp_host']           = "localhost";
        $config['smtp_port']           = "25";
        $config['mailtype'] = 'html';
        $config['charset']  = 'utf-8';
        $config['newline']  = "\r\n";
        $config['wordwrap'] = TRUE;

        $this->email->initialize($config);
        
        $this->email->from("aa22@naver.com" , "고양이"); //보내는 사람
        $this->email->to("asd@naver.com"); //받는 사람
        $this->email->subject("제목."); //메일 제목
        $this->email->message("내용입니다 : "); //내용
        
        if ($this->email->send())
        {
             $result = "succ성공냥";
        }
        echo $this->email->print_debugger()."</br>";
        echo json_encode($result);        

위 코드대로 하면 메일을 보냈다고뜹니다 내용은..
전부생략하고 
Your message has been successfully sent using the following protocol: smtp

하지만 메일이 안옵니다.
그래서 설정중에   //  $config['smtp_host']           = "localhost"; 를 주석처리하니
You did not specify a SMTP hostname.
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
라고뜹니다.

1.smtp_host는 뭘로 설정해야하는지..
2.설정하는 화면중에 잘못된게있는지..
3. 추가해야할 설정이있는지요..(smtp_user,smtp_pass등0) 
4.ㅠㅠ 도움부탁드립니다.
 다음글 Query Hooking 질문입니다. (4)
 이전글 컨트롤러에서 생성자는 사용가능한데요. 소멸자는 사용 못... (2)

댓글

한대승(불의회상) / 2015/01/08 12:21:45 / 추천 0
OS가 윈도우라면 성공이라고 나와도 메일은 안날아 갑니다.
neo천 / 2015/01/08 12:41:36 / 추천 0
$config['smtp_host']           = "ssl://smtp.googlemail.com";
        $config['smtp_user']           = $this->m_adminMail;
        $config['smtp_pass']           = $this->m_adminMailPass;
$config['smtp_port']           = "465";
자답입니다