php 在电子邮件正文中嵌入 flash

发布于 2024-09-13 17:34:27 字数 51 浏览 4 评论 0原文

如何

使用 php 在电子邮件正文中嵌入 flash (电子邮件功能)

How to embedded flash on email body ,

Using php
(email function)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦在深巷 2024-09-20 17:34:27

我认为您不能在电子邮件中嵌入 Flash。电子邮件客户端(至少是我熟悉的那些)不渲染 Flash 或支持该插件(除非其他人知道有一些这样做)。

I don't think you can embed flash in an email message. Email clients (at least those I'm familiar with) don't render flash or support the plugin (unless someone else know of some that do).

纵山崖 2024-09-20 17:34:27

您必须使用带有 标记和包含的 SWF 文件 multipart/lated 资源的 HTML 邮件,与处理内嵌图像的方式相同。请参阅此示例。

但尝试是没有意义的:绝大多数电子邮件客户端不会显示它。电子邮件客户端(包括网络邮件提供商)对 CSS 和 JavaScript 等 HTML 功能的支持极其有限且可变,这些功能在普通网页上被认为是理所当然的。像Flash这样的插件?完全不可能。 (谢天谢地。我的邮箱中最不想出现的就是一堆吵闹的、闪烁的 CPU 占用。)

编写在各种邮件客户端上实际按预期显示的 HTML 是一种令人沮丧的练习,通常最好避免这种情况。将其放在网页上。在邮件中发送链接。工作完成了。

You would have to use an HTML mail with an <embed> tag and an included multipart/related resource for the SWF file, in the same way you do inline images. See eg this example.

But there is no point in trying: the vast majority of e-mail clients aren't going to display it. E-mail clients (including webmail providers) have extremely limited and variable support for HTML features like CSS and JavaScript that are taken for granted on a normal web page. Plugins like Flash? Totally out of the question. (And thank god. Last thing I want in my mailbox is a bunch of noisy flashing CPU hogs.)

Authoring HTML that actually displays as intended on a wide range of mail clients is an exercise in frustration, which is usually best avoided. Put it on a web page. Send a link in the mail. Job done.

浪漫之都 2024-09-20 17:34:27

您当然可以将 Flash .swf 作为附件嵌入到电子邮件中。该过程与附加图像以供在线使用相同。但是,无法让 Flash 影片在页面内实际播放。

如果您要附加图像,则可以使用 PHPMailer 来执行此操作:

$m = new PHPMailer();
$m->AddEmbeddedImage('/path/to/image.jpg', 'picture', 'picture', 'base64', 'image/jpeg');

并在邮件的 HTML 正文中,您可以参考如下图片:

<img src="cid:picture" alt="The embedded picture" />

您可以使用完全相同的调用序列嵌入 Flash .swf。然而,没有办法真正让电影播放。 Flash 插件不理解/尊重“cid:”方法,因此无法从电子邮件正文中读取 .swf 数据。您最多可以附加 .swf 和脱机 Flash 播放器 .exe 的副本,以便电子邮件收件人保存并在其本地计算机上运行。

You can certainly embed a Flash .swf within an email as an attachment. The process is identical to attaching an image for in-line use. However, there's no way to get the Flash movie to actually play within the page.

If you were attaching an image, you'd do this, using PHPMailer:

$m = new PHPMailer();
$m->AddEmbeddedImage('/path/to/image.jpg', 'picture', 'picture', 'base64', 'image/jpeg');

And within the HTML body of the mail, you'd refer to the picture like this:

<img src="cid:picture" alt="The embedded picture" />

You can embed the Flash .swf using the exact same call sequence. However, there is no way to actually get the movie to play. The Flash plugin does not understand/honor the "cid:" method and so cannot read the .swf data from within the email body. At most you can attach the .swf and a copy of the offline Flash player .exe for the email recipient to save and run off their local machine.

执妄 2024-09-20 17:34:27

这个问题其实和PHP没有任何关系。您真正要问的是如何在 HTML 电子邮件中使用 Flash。这是不可能的。电子邮件客户端忽略插件、Javascript 等。它们还忽略大量 HTML。

This question doesn't really have anything to do with PHP. What you are really asking is how to use Flash in an HTML e-mail. This isn't possible. E-mail clients ignore plugins, Javascript, etc. They also ignore a great deal of HTML.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文