2011-10-17 1 views
4

Hotmail로 보내거나 Microsoft Outlook에서 보낸 전자 메일은 항상 공백으로 표시되고 다른 사람에게는 아무런 문제가 없습니다.). 내가 CodeIgniter의를 사용 Outlook과 Hotmail에서 전자 메일이 보이지 않는 경우

, 여기에 이메일에 대한 설정입니다 :

$config['mailtype'] = "html"; 
$config['charset'] = "utf-8"; 
$config['newline'] = "\r\n"; 
$config['crlf'] = "\r\n"; 

그리고이 이메일 템플릿 모습입니다 :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
    <head><title>Welcome to <?php echo $site_name; ?>!</title></head> 
    <body> 
     <div style="max-width: 800px; margin: 0; padding: 30px 0;"> 
      <table width="80%" border="0" cellpadding="0" cellspacing="0"> 
       <tr> 
        <td width="5%"></td> 
        <td align="left" width="95%" style="font: 13px/18px Arial, Helvetica, sans-serif;"> 
         <img src="<?php echo base_url(); ?>/media/images/logo.png" alt="Logo" /> 
         <br /><br /> 
         <h2 style="font: normal 20px/23px Arial, Helvetica, sans-serif; margin: 0; padding: 0 0 18px; color: black;">Welcome to <?php echo $site_name; ?>!</h2> 
         Thanks for joining <?php echo $site_name; ?>. We listed your sign in details below, make sure you keep them safe.<br /> 
         To verify your email address, please follow this link:<br /> 
         <br /> 
         <big style="font: 16px/18px Arial, Helvetica, sans-serif;"><b><a href="<?php echo site_url('/activate/'.$user_id.'/'.$new_email_key.'/'.$newsletter); ?>" style="color: #3366cc;">Finish your registration...</a></b></big><br /><br /> 
         Link doesn't work? Copy the following link to your browser address bar<br /> 
         <nobr><a href="<?php echo site_url('/activate/'.$user_id.'/'.$new_email_key.'/'.$newsletter); ?>" style="color: #3366cc;"><?php echo site_url('/activate/'.$user_id.'/'.$new_email_key.'/'.$newsletter); ?></a></nobr><br /> 
         <br /> 
         Please verify your email within <?php echo $activation_period; ?> hours, otherwise your registration will become invalid and you will have to register again.<br /> 
         <br /> 
         <br /> 
         Please note that this is an automated message, do not respond to this email. If you have any questions, please don't hesitate to <a href="<?php echo base_url(); ?>contact-us">contact us here</a>. 
         <br /> 
         <br /> 
         Have fun!<br /> 
         The <?php echo $site_name; ?> Team 
        </td> 
       </tr> 
      </table> 
     </div> 
    </body> 
</html> 

내가이 작품을 만들기 위해 실종 뭔가 있나요 Outlook과 Hotmail에서? 감사!

+0

코드에 오류가 없습니다. 이메일을 디버깅 할 수 있습니까? $ this-> email-> print_debugger();를 사용하십시오. 디버그하려면 – chhameed

답변

8

Hotmail/Outlook은 개행과 crlf 전자 메일 구성에서 "\ r \ n"을 좋아하지 않는 것처럼 보입니다. 그것들을 제거하면 문제가 해결되었습니다.

+0

이것은 txt 전자 메일에 영향을 줍니까? –

+0

나는 PyroCMS를 사용하여 이것을 가지고 있었다. 고침은 저를 위해 너무 일했습니다, 그러나 뉴 라인의 제거에서 유래하는 어떤 불리한 결과든지 있는지 나는 확실하지 않다 – Polsonby