我試圖通過電子郵件直接發送HTML模板沒有頁面的複製粘貼,我的意思是隻是把HTML代碼,併發送它作爲該HTML頁面不是原始文本,主要原因是通過Delphi發送這個HTML模板。DELPHI中的電子郵件中的HTML
的問題是我們從HTML獲取只有文字,我的意思是隻有這部分:
<p>Hola chicos!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
,什麼我不能得到它顯示的這些行:
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" background="http://www.feelmalagahostel.com/emails/content.jpg">
<table width="800" border="0" cellspacing="0" cellpadding="0" background="http://www.feelmalagahostel.com/emails/header_feel_summer.jpg" style="background-position:top; background-repeat:no-repeat;">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" background="http://www.feelmalagahostel.com/emails/footer.jpg" style="background-position:bottom; background-repeat:no-repeat;">
它只是省略它們,顯示標記圖像而不顯示背景圖像。
這樣的問題,我該如何做到在電子郵件中顯示?並需要背景圖片。
的HTML代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<body marginheight="0" marginwidth="0">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" background="http://www.feelmalagahostel.com/emails/content.jpg">
<tr>
<td valign="top">
<table width="800" border="0" cellspacing="0" cellpadding="0" background="http://www.feelmalagahostel.com/emails/header_feel_summer.jpg" style="background-position:top; background-repeat:no-repeat;">
<tr>
<td align="center" valign="top">
<!--header-->
<table width="730" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="230"> </td>
</tr>
<tr>
<td height="100" align="right" valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<tr></tr>
</table>
</td>
</tr>
<tr>
<td height="10"> </td>
</tr>
<tr>
<td height="61" align="right">
<img src="https://www.auto21.ca/userImages/images/test%20drive%20logo%20FINAL.jpg" width="347" height="61" />
</td>
</tr>
</table>
<!--end header-->
<br/>
<br/>
<!--content-->
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top"> <font face="Arial, Helvetica, sans-serif" size="2">
<p>Hola chicos!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci </p>
<p>velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
</font>
</td>
</tr>
</table>
<!--end content-->
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" background="http://www.feelmalagahostel.com/emails/footer.jpg" style="background-position:bottom; background-repeat:no-repeat;">
<tr>
<td valign="top">
<!--footer-->
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="300" valign="top"></td>
</tr>
<tr height="250">
<td></td>
</tr>
</table>
<!--end footer-->
</td>
</tr>
</table>
</body>
</html>
什麼問題呢?只是['do it'](http://www.indyproject.org/Sockets/Blogs/RLebeau/2005_08_17_A.EN.aspx);-) – TLama 2013-04-29 22:49:55
我在這裏沒有看到任何問題,只是告訴我們你想要做一點事。 – 2013-04-29 22:55:41
我認爲他想發送HTML * AS IS *,即作爲文本,而不是HTML。在這種情況下,使用由JachGate提供的代碼,您可以將字符串添加到電子郵件的* text *屬性中,而不是其HTML屬性。 – 2013-04-30 03:10:41