2017-11-30 3 views
0

우리는 codeigniter 사이트에서 CI 메일 라이브러리를 사용합니다. 그것은 Gmail에서 적절한 형식으로 이메일을 보내지 만, 핫메일과 야후에 그냥Codeigniter 전자 메일 기능이 야후 및 라이브 메일에서 렌더링 된 html 코드를 보내지 못함

우리가이와 파일의 HTML 템플릿을 호출하는 HTML 코드를 보여줍니다

emailer_temp.php

<!DOCTYPE> 
<html> 
<head> 
    <title>Registration Confirmation Letter</title> 

    <style><body> 
     <table width="100%" cellspacing="0" cellpadding="0" border="0" style="background:rgb(233, 234, 234) none repeat scroll 0% 0%/auto padding-box border-box;"><tbody><tr><td><div style="margin:0 auto;width:1089px;padding:0px"> 
       <table class="main mce-item-table" width="100%" cellspacing="0" cellpadding="0" border="0" align="center" data-types="background,padding,border-radius,image-settings" data-last-type="image-settings"> 
        <tbody> 
         <tr> 
          <td align="center" class="image image-full element-content element-contenteditable active" style="padding:0;"> 
           <img class="content-image " style="width: 1089px; height: 287px;" src="<?=base_url()."assets/emailer/register.png";?>"> 
          </td> 
         </tr> 
        </tbody> 
       </table> 
    </body> 
    </html> 

전화 템플릿 컨트롤러 컨트롤러

if($ResponseCode=="0"){ 
      if(checkonlinepayment($MerchantRefNo,$Amount)==1){ 
      $data->user = $this->user_model->get_user_profile($userid); 
      $data->accuser = $this->user_model->get_user_accommodation($userid); 
      $data->userpayacc = $this->user_model->get_paydataacc($PaymentID); 
      $this->sendtomail($data->user[0]->email,"Registration Confirmation Letter",$data,"emails/emailer_temp.php"); 
      $mobileno = $data->user[0]->mobileno; 
      $this->sendacctosms($mobileno); 
      } 
     } 

사용 sendtomail 기능

012,322,

그래서이 코드는 Yahoo와 Hotmail에서 렌더링 된 메시지 대신 텍스트로 HTML 코드를 보내는 이유는 무엇입니까? 그것은 Gmail과 함께 작동합니다!

$this->email->set_header('MIME-Version', '1.0; charset=utf-8'); 

참고 :

답변

0

가장 가능성이 당신이 사용되는 $this->email->set_header() 문제

당신은 당신의 MIME 선언에서 세미콜론 ';'을 사용하고 있습니다.

는 같아야

$this->email->set_header('MIME-Version=1.0', 'charset=utf-8'); 
+0

$ i가 동일 할 this-> 이메일 -> set_header ('MIME 버전 = 1.0', '캐릭터 = UTF-8 "); 하지만 여전히 같은 오류, 어떤 해결책을 얻을 수 없어! –