2011-10-17 83 views
4

由於某些原因,發送到Hotmail或在Microsoft Outlook上查看的電子郵件始終顯示爲空白,據我所知,其他人沒有問題(除了使用Hotmail和Outlook的人以外沒有其他人投訴)。在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

相關問題