HTML Email formatting stripped out

2019-08-22 09:59发布

问题:

I've created a very simple HTML email and am in the process of testing it. In Apple Mail and mailtrap it looks perfect, however, in Spark it looks like a plain-text email.

Title Goes Here

Body goes here

— Company

I've received emails from Twitter with this same layout and they look perfect in Spark... All my styles are inline and the code is very basic; I've even tried it with different doctypes and without google fonts, but with the same results.

I'm failing to see what I'm doing wrong.

Here's a Fiddle

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <title>Notification</title>
</head>

<body style="padding: 10px; background-color: #f6f6f6" bgcolor="#f6f6f6">

    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; border-radius: 3px; background-color: #ffffff; border: 1px solid #e9e9e9">
        <tr>
            <td style="border-radius: 3px 3px 0 0; background-color: #cccccc; padding: 40px 0">
                <p style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 2em; color: #ffffff; text-align: center">
                    Title Goes Here
                </p>
            </td>
        </tr>
        <tr>
            <td style="padding: 40px; color:#222222">
                <p style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
                    Body goes here
                </p>

                <p style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-top: 30px">
                    &mdash; Company
                </p>
            </td>
        </tr>
    </table>

</body>
</html>

回答1:

Turns out it's a bug with Spark.

Per their customer service: "Our development team has reproduced the case and the display of this type of emails will be improved further on."