2017-10-05 9 views
0

를이 내 코드 사용하여 스팸 메일 상자로 이동합니다.CodeIgniter의 이메일이 전송은 아마존 EC2

+1

오류는 암호를 인증하지 못했습니다. 올바른 로그인 자격증 명 – BSB

+0

을 사용하고 있는지 확인하십시오. cpanel 또는 windows – Mahesh

+0

로그인 자격 증명이 올바른지 확인하십시오. @BSB –

답변

0

이 Google 계정의 보안 수준이 낮은 앱에 대한 액세스를 사용하도록 설정해야 작동하기 위해서는 당신이 아니기 때문에, 당신은 구글의 SMTP 서버에 오류가있다, 그것은, 그리고

$config = array(
    'protocol' => 'smtp', 
    'smtp_host' => 'ssl://smtp.gmail.com', 
    'smtp_user' => '[email protected]', 
    'smtp_pass' => '******', 
    'smtp_port' => '465', 
    'mailtype' => 'html', 
    'smtp_timeout' => '4', 
    'newline' => "\r\n" 
); 
$this->email->initialize($config); 

$this->email->to('[email protected]'); 
$this->email->cc();//$this->input->post('cctxt') 
$this->email->from('[email protected]'); 
$this->email->subject('Test subject'); 
$this->email->message('Test message'); 
$this->email->send(); 
echo $this->email->print_debugger(); 

과 같이해야한다 먼저 OAUTH를 사용합니다. 행운

Enable access For less Secure Apps

좋은!

+0

아니요.이 구성을 사용할 때 아니오. 메일 발송 중지. 내 서버는 https이므로 smtps를 사용해야합니다. 이제 내 문제는 스팸 메일이 발생하는 이유입니다. –