- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在编写一个脚本,通过电子邮件将一些格式化的 html 和图像发送给收件人。使用 MIME::Lite,我找到了一种发送 css 文件及其用作附件的图像文件的方法。该图像出现在邮件消息的末尾 - 作为附件。以下行似乎有效:
<link href="cid:style.css" rel="stylesheet" type="text/css" />
我的问题是以下几行(在文件 style.css 中)的语法应该是什么?以下不起作用。
body {
background-image:url("cid:bgLine.png");
background-repeat:repeat-x;
}
此外,如何阻止邮件客户端自行显示图像?我使用的脚本如下:
my $msg = MIME::Lite->new( From =>"from\@company\.com",
To => "to\@company\.com",,
Subject =>"Action Required",
Disposition =>'inline',
Type =>'multipart/related');
$msg->attach(Type => 'text/html', Data => qq{@htFileContents});
$msg->attach(Type => 'text/html', Id => $cssFileName, Data => qq{@cssFileContents});
$msg->attach(Type => 'image/png', Id => $imageFile, Path => $imageFile);
$msg->send("sendmail","/usr/sbin/sendmail -t");
让邮件客户端访问来自 http 服务器的 css 或图像文件的 URL 不是一个选项。电子邮件需要独立。 TIA 的语法示例。
最佳答案
这真的行不通。即使奇迹般地让您的附件相互查看和交谈,Outlook 将不支持背景图片,Gmail 将删除您链接的 css 文件和任何嵌入的 css,而 hotmail 将不支持 css 背景。
听起来您需要在接受动态部分的某个地方托管 HTML 电子邮件,并从您的应用程序中触发发送,将动态部分传递给它以在发送前填写。查看 Lyris Listmanager 之类的工具。
关于html - 使用 cid :attachmentID in e-mail for image file used in css 的语法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24916962/
我正在关注 Google Gmail API我的 iOS 项目中的文档,我需要使用 userId、messageId 和 id 从邮件下载附件 Try out from Google . 其中 use
我正在编写一个脚本,通过电子邮件将一些格式化的 html 和图像发送给收件人。使用 MIME::Lite,我找到了一种发送 css 文件及其用作附件的图像文件的方法。该图像出现在邮件消息的末尾 - 作
我是一名优秀的程序员,十分优秀!