电子邮件在 Outlook 和 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";

这就是电子邮件模板的样子:
<!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 中进行这项工作时我缺少什么吗?谢谢!

最佳答案

看起来出于某种原因,Hotmail/Outlook 不喜欢换行符和 crlf 电子邮件配置中的“\r\n”。删除那些解决了问题。

关于电子邮件在 Outlook 和 Hotmail 中显示为空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7788822/

相关文章:

python - 使用 Scrapy 邮件模块发送电子邮件时连接被拒绝

php - fwrite() : SSL operation failed with code 1. OpenSSL 错误消息:错误:1420C0CF:SSL 例程:ssl_write_internal:协议(protocol)已关闭

JavaMail 和电子邮件帐户的连接

ios - 防止 iphone 电子邮件客户端缩放响应电子邮件

javascript - Meteor 邮件成功提醒

php - 将 MIkrotik 日期时间转换为 Mysql 日期时间

php - codeigniter 检查每个 Controller 中的用户 session

php - 在一份表单提交中更新多行 Codeigniter

javascript - 在 JavaScript 中解析 .msg 文件

performance - 为什么 Outlook 关闭时 Excel VBA 的运行速度明显加快?