如何在邮件服务器上的HTML邮件中嵌入图像? [英] How to embed images in HTML email on the mail server?

查看:110
本文介绍了如何在邮件服务器上的HTML邮件中嵌入图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在HTML中嵌入图像,以便图像与html文件内容一起传递,不需要单独访问服务器来检索图像?在离开邮件服务器之前,我们需要将公司标志嵌入到签名中。我们不想使用像Thunderbird或Outlook的功能的客户端解决方案来添加签名。

How does one embedd an image in HTML so that the image is delivered with the html file content and does not need a separate trip to the server to retrieve the image? We need this to embed company logo's into signatures before they leave the mail server. We don't want to use a client side solution like thunderbird's or outlook's functionality to add signatures.

谢谢

推荐答案

您需要做的是将文件编码为Base64,并将其包含如下:

What you need to do is encode the file to Base64, and include it like this:

<img src="data:image/gif;base64,R0lGODlhUAA..(the rest of your base64 encoded file)..">

http://www.sweeting.org/mark/blog/2005/07/12/base64-encoded-images-embedded -in-html

http://dean.edwards.name/weblog/2005/06/base64-ie/

这篇关于如何在邮件服务器上的HTML邮件中嵌入图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆