Email Outlook和Hotmail中显示为空白的电子邮件

Email Outlook和Hotmail中显示为空白的电子邮件,email,codeigniter,outlook,html-email,hotmail,Email,Codeigniter,Outlook,Html Email,Hotmail,出于某些原因,发送到Hotmail或在Microsoft Outlook上查看的电子邮件总是显示为空白,据我所知,其他人的电子邮件也没有问题(除了使用Hotmail和Outlook的人之外,没有人抱怨) 我使用CodeIgniter,以下是电子邮件的设置: $config['mailtype'] = "html"; $config['charset'] = "utf-8"; $config['newline'] = "\r\n"; $config['crlf'] = "\r\n"; 这就是电子

出于某些原因,发送到Hotmail或在Microsoft Outlook上查看的电子邮件总是显示为空白,据我所知,其他人的电子邮件也没有问题(除了使用Hotmail和Outlook的人之外,没有人抱怨)

我使用CodeIgniter,以下是电子邮件的设置:

$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>

欢迎光临!
/media/images/logo.png“alt=”logo“/>


欢迎光临! 感谢您的加入。我们在下面列出了您的登录详细信息,请确保它们的安全。
要验证您的电子邮件地址,请点击以下链接:



链接无效?请将以下链接复制到浏览器地址栏


请在数小时内验证您的电子邮件,否则您的注册将无效,您必须重新注册。


请注意,这是一封自动发送的邮件,请勿回复此邮件。如果您有任何问题,请随时联系。

玩得开心!
团队

在Outlook和Hotmail中,我是否缺少一些东西来实现这一点?谢谢!

出于某种原因,Hotmail/Outlook似乎不喜欢换行符和crlf电子邮件配置中的“\r\n”。删除这些选项可以修复此问题。

您的代码没有任何错误。您可以调试电子邮件吗?使用$this->email->print\u debugger();调试它这会影响txt电子邮件吗?我使用PyroCMS也有此功能;修复对我也有效,但我不确定删除换行符是否会产生任何不利影响