| 제목 | smtp로 구글 메일 보내기가 에러가 나서요 | |||
|---|---|---|---|---|
| 글쓴이 | kashou | 작성시각 | 2013/11/20 18:45:22 | |
|
|
||||
|
이게 웃긴게 테스트서버에서 user.customerdomain.com / shop.customerdomain.com 는 메일이 발송이 잘됩니다;; 근데 실제 서버에서는 user.customerdomain.com 은 잘 되는데, shop.customerdomain.com 에서는 발송이 실패되는데 내용이 아래와 같습니다. 유저사이트에서는 잘만 보내는데, 딜러사이트에서는 에러를 내뿜습니다;;
두가지 방법으로 해봤는데 다 에러라 ㅠㅠ
//원래한 방법은 이렇게 했습니다. Case1
$email_config['mailtype'] = "html";
$email_config['charset'] = "UTF-8";
$email_config['protocol'] = "smtp";
$email_config['smtp_host'] = "ssl://smtp.googlemail.com";
$email_config['smtp_port'] = 465;
$email_config['smtp_user'] = "noreply@gmail.com";
$email_config['smtp_pass'] = "testpwd";
$email_config['smtp_timeout'] = 10;
$email_config['wordwrap'] = TRUE;
// 해당 이메일로 확인 메일을 송신
$this->load->library('email', $email_config);
$this->email->set_newline("\r\n");
$this->email->clear();
$this->email->from(DEF_MAIL_FROM, DEF_MAIL_FROM_NAME);
$this->email->to( $receive_email );
$this->email->subject( 'purchased information' );
$this->email->message( $htmlMessage );
$this->email->set_alt_message( $txtMessage );
if ( strlen($receive_email) > 0 )
{
if (!$this->email->send())
{
//fail, 메일테이블에 로그 기록
}
else
{
//success, 메일테이블에 로그 기록
}
}
//Case2. 1이나 이거나 별차이없습니다만..T_T
$email_config = array(
'mailtype' => 'html',
'charset' => 'UTF-8',
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'noreply@gmail.com',
'smtp_pass' => 'testpwd',
'wordwrap' => true,
'smtp_timeout' => 10
);
// 해당 이메일로 확인 메일을 송신
$this->load->library('email', $email_config);
$this->email->set_newline("\r\n");
$this->email->clear();
$this->email->from(DEF_MAIL_FROM, DEF_MAIL_FROM_NAME);
$this->email->to( $receive_email );
$this->email->subject( 'purchased information' );
$this->email->message( $htmlMessage );
$this->email->set_alt_message( $txtMessage );
if ( strlen($receive_email) > 0 )
{
if (!$this->email->send())
{
//fail, 메일테이블에 로그 기록
}
else
{
//success, 메일테이블에 로그 기록
}
}
여러분의 지혜를 빌려주세요 ㅠㅠㅠㅠㅠ |
||||
| 다음글 | 디비 연결 타임아웃 설정 (3) | |||
| 이전글 | 포럼 소스를 다시 다운받아 설치해보니 message 라... (2) | |||
|
변종원(웅파)
/
2013/11/21 10:35:57 /
추천
0
|
포트 열려있나 체크부터.. ^^