简体   繁体   中英

Outlook forward strips content from email

I have built/pieced together an email in Pardot. The email works fine up until someone receives the forward, then the entire header section disappears; images, background-color, text and all.

Here is my code, any suggestions? My html/css skills are less than great, apologies in advance.

<tr pardot-repeatable="Hero Banner Section" style="width: 650px;" width="650px">
                </tr>
                <tr>
                    <td class="pattern" width="650" align="center">
                    <table cellspacing="0" cellpadding="0">
                        <tbody>
                            <tr>
                                <td class="col" style="background-color: #f6f6f6;" width="325" valign="top" height="275">
                                <table cellspacing="0" cellpadding="0">
                                    <tbody>
                                        <tr>
                                            <td class="headline" pardot-region="pardot" style="font-family: Open Sans,sans-serif; font-size: 14px; font-weight: 800; color: #333; padding-top: 2rem; padding-left: 20px;" align="left">Join us in Tampa, FL</td>
                                        </tr>
                                        <tr>
                                            <td class="webinar_title" pardot-region="pardot" style="font-family: Open Sans,sans-serif; font-size: 24px; font-weight: 800; line-height: 2rem !important; color: #ea8c2a; padding-top: 10px; padding-right: 20px; padding-left: 20px;" align="left">2019 DATIS<br>
                                            Client Summit</td>
                                        </tr>
                                        <tr>
                                            <td class="time" pardot-region="pardot" style="font-family: Open Sans,sans-serif; font-size: 1rem; font-weight: 800; line-height: 1.5rem !important; color: #333333; padding-top: 10px; padding: 20px 20px 20px 20px" align="left">February 27 - March 1</td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: center;">
                                            <div><a href="https://www.eventbrite.com/e/datis-client-summit-2019-tickets-49692846642" style="background-color:#ea8c2a;border:1px solid #ea8c2a;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:40px;text-align:center;text-decoration:none;width:200px; margin:20px;-webkit-text-size-adjust:none;">Register Now</a></div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                </td>
                                <td class="col" width="325px" valign="top">
                                <table cellspacing="0" cellpadding="0">
                                    <tbody>
                                        <tr>
                                            <td class="hero_image" style="background-color: #f6f6f6;"><img alt="" src="http://go.datis.com/l/106012/2018-10-05/4jdtys/106012/102359/SummitEMC_HeroRight_2.jpg" style="display: block; border: 0px;" width="325" height="275"></td>
                                        </tr>
                                    </tbody>
                                </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    </td>
                </tr>
            </tbody>
        </table>
        </td>
    </tr>

According to test your code, you could change your code to the below code(I put my HTML code in a .html file):

<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title></title>

</head>
<body style="margin:0; padding:0; background-color:#FFFFFF;">

  <table width="640" cellspacing="0" cellpadding="0" border="0" align="center" style="max-width:640px; width:100%; background-position:right top !important; background-size:cover !important;"  bgcolor="#006554">
    <tbody>
      <tr pardot-repeatable="Hero Banner Section" style="width: 650px;" width="650px">
      </tr>
      <tr>
          <td class="pattern" width="650" align="center">
          <table cellspacing="0" cellpadding="0">
              <tbody>
                  <tr>
                      <td class="col" style="background-color: #f6f6f6;" width="325" valign="top" height="275">
                      <table cellspacing="0" cellpadding="0">
                          <tbody>
                              <tr>
                                  <td class="headline" pardot-region="pardot" style="font-family: Open Sans,sans-serif; font-size: 14px; font-weight: 800; color: #333; padding-top: 2rem; padding-left: 20px;" align="left">Join us in Tampa, FL</td>
                              </tr>
                              <tr>
                                  <td class="webinar_title" pardot-region="pardot" style="font-family: Open Sans,sans-serif; font-size: 24px; font-weight: 800; line-height: 2rem !important; color: #ea8c2a; padding-top: 10px; padding-right: 20px; padding-left: 20px;" align="left">2019 DATIS<br>
                                  Client Summit</td>
                              </tr>
                              <tr>
                                  <td class="time" pardot-region="pardot" style="font-family: Open Sans,sans-serif; font-size: 1rem; font-weight: 800; line-height: 1.5rem !important; color: #333333; padding-top: 10px; padding: 20px 20px 20px 20px" align="left">February 27 - March 1</td>
                              </tr>
                              <tr>
                                  <td style="text-align: center;">
                                  <div><a href="https://www.eventbrite.com/e/datis-client-summit-2019-tickets-49692846642" style="background-color:#ea8c2a;border:1px solid #ea8c2a;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:40px;text-align:center;text-decoration:none;width:200px; margin:20px;-webkit-text-size-adjust:none;">Register Now</a></div>
                                  </td>
                              </tr>
                          </tbody>
                      </table>
                      </td>
                      <td class="col" width="325px" valign="top">
                        <table cellspacing="0" cellpadding="0">
                            <tbody>
                                <tr>
                                    <td class="hero_image" style="background-color: #f6f6f6;"><img alt="" src="http://go.datis.com/l/106012/2018-10-05/4jdtys/106012/102359/SummitEMC_HeroRight_2.jpg" style="display: block; border: 0px;" width="325" height="275"></td>
                                </tr>
                            </tbody>
                        </table>
                      </td>
                  </tr>
              </tbody>
          </table>
          </td>
      </tr>
    </tbody>
  </table>
</body>
</html>

This is part of my c# code:

string stringHtmlBodyfromFile = File.ReadAllText(Your HTML File URL);
                Microsoft.Office.Interop.Outlook.MailItem mailItem = app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem) as
                                                                     Microsoft.Office.Interop.Outlook.MailItem;
                mailItem.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;
                mailItem.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh;
                mailItem.Subject = subject;
                mailItem.To = email;
                mailItem.HTMLBody = stringHtmlBodyfromFile;
                mailItem.CC = cc;
               //mailItem.Display();

This is my result:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM