我正在尝试使用电子邮件中的嵌入图像作为背景图像,我有以下代码来嵌入它:
@H_403_2@LinkedResource backgroundLink = new LinkedResource("..\\..\\background.gif");
backgroundLink.ContentId = "BackgroundImage";
backgroundLink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
htmlView.LinkedResources.Add(backgroundLink);
m.AlternateViews.Add(htmlView);
@H_403_2@<table background='cid:BackgroundImage'>
<tr>
<td>
test
</td>
</tr>
</table>
它不显示,但当我把它作为一个像这样的图像是很好的:
@H_403_2@<table> <tr> <td> <img src='cid:BackgroundImage' /> </td> </tr> </table>有谁知道为什么它不会显示为背景?
提前谢谢了 :)
解决方法
请注意,MS Outlook 2007,Live Hotmail等不支持具有某种背景图像的电子邮件内容,无论是正文,表格等.
在使用您的电子邮件客户端测试之前检
http://www.campaignmonitor.com/css/