在html电子邮件中发送个性化图像的推荐方法是什么? [英] What is the recommended way for sending personalized images in html emails?

查看:147
本文介绍了在html电子邮件中发送个性化图像的推荐方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道类似的问题已经被问到了,但是答案几乎总是一样的:你需要在服务器上共享图像,并从电子邮件中链接到它。



为了我的目的,我不能这样做。



需要为每个发送电子邮件的用户个性化图像(因此电子邮件将为每个用户动态生成,并不总是相同的,我不能分享图像 - 因为它将改变,而且为了避免披露用户的信息)。



你有没有遇到这种情况?我应该用附件还是base64编码图像?想法/经验?

解决方案

HTML体必须使用内容id(cid)引用图像:< img src =cid:xyz> ,其中xyz是附件内容标识(Content-ID)MIME标题的值。



如果要以MIME格式直接创建消息,请确保将附件添加到消息中,并将其Content-ID MIME标题设置正确。如果您是Outlook对象模型或MAPI,则必须在图像上设置PR_ATTACH_CONTENT_ID属性。


I know similar questions have already been asked but the answer is almost always the same: you need to share the image on a server and link to it from within the email.

For my purpose I cannot do that.

The image needs to be personalized for each user I send an email to (so the email will be dynamically generated for each user and will not always be the same. I cannot share the image -- since it will change but also for avoiding disclosure of users' information).

Have you ever encountered this scenario? Should I go with attachments or base64 encoding of images? Thoughts/experiences?

解决方案

The HTML body must refer to the images using the content id (cid): <img src="cid:xyz">, where xyz is the value of the attachment content id (Content-ID) MIME header.

If you are creating the message directly in the MIME format, make sure the attachment is added to the message and its Content-ID MIME header is properly set. If you are Outlook Object Model or MAPI, you must set the PR_ATTACH_CONTENT_ID property on the image.

这篇关于在html电子邮件中发送个性化图像的推荐方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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