有些问题涉及到的电子邮件签名里面实现的形象? [英] Some questions related to implementation of image inside email signature?

查看:186
本文介绍了有些问题涉及到的电子邮件签名里面实现的形象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要实现与现在image.As的电子邮件签名,我们只支持在电子邮件签名文本这已经是working.i需要提供的功能
在那里我可以插入邮件签名中的映像。我可以发送电子邮件给用户MyApplication的范围内,也给用户外部邮件域,如Gmail,雅虎等。当
邮件在我的应用系统发送到某些用户使用,系统使entryt O DB,当接收器在接收到收件箱(在内部读取数据库邮件)。现在,如果用户
发送邮件给外部用户在Gmail它使用的javax邮件API的。类似地我可以从外部邮件域(Gmail,雅虎等),现在我有收到邮件
基于TIS要求几个问题: -

i need to implement the email signature with image.As of now we only support the text in email signature which is already working.i need to provide the functionality where i can insert the image inside mail signature. i can send the email to user within myapplication and also to user on external mail domain like gmail,yahoo etc. When mail is sent to some user with in my application system, system makes entryt o DB and when receiver receives in inbox (which internally read the mail from db). Now if user send the mail to external user on gmail it makes use of javax mail api . Similary i can receive the email from external mail domains(gmail,yahoo etc) Now i have few questions based on tis requirement:-

1)是否有如Gmail外部邮件域如何发送图像内的签名一样(我的应用程序的邮件域)的另一个域中的任何标准?
有关它的Gmail用户还有一点可以有两个图像,一个用于签名和体内其他图像。我如何确定哪些图像属于
签名?是否有任何定义的属性是什么?

2)也没能做出什么是发送(无论是内部应用程序的用户或外部邮件域用户),其中包含电子邮件签名最好的/一致的方法
图像,使其正确呈现当用户收到了吗?

我在我的脑海点2: - 我刚才还以为我可以使用解决方案在的如何在JSP中显示图像?。哪里
与标签的< .IMG SRC =/?getImage.action imageId = 123> ,我可以从数据库中的动作类或servlet和返回获取图像。但同时要注意
 有一次,我的邮件发送到Gmail的用户,他将无法访问此方法似乎并不适合在要求servlet.So。
然后,我遇到了另一个伟大的计算器链接 连接的base64 codeD图像,电子邮件签名哪里
由Tim梅多拉的解决方案看起来很好,但再评论解决下面的Gmail似乎并不支持它再次结束了我的乡亲
我真的认为,如果像gmail邮箱域名,雅虎支持在这种情况下,因为所提出的解决方案,我可以给图像为base64字符串,而不是我应该做的事
图像以附件。

what I had in my mind for point 2:- i earlier thought i can use solution suggested at How to display an image in jsp?. where with tag <.img src="/getImage.action?imageId=123">, i can fetch the image from db in action class or servlet and return. But keeping in mind once i send the mail to the user on gmail , he will not be able to access the servlet.So this approach does not seems to fit in requirement. Then i came across the another great stackoverflow link base64 encoded images in email signatures where solution by Tim Medora looked great but again the comment below the solution Gmail doesn't seem to support it again ended my Folks really i think i should be done if mail domain like gmail,yahoo support the solution suggested by because in that case i can send image as base64 string instead of image as attachment.

伙计们会很感激,如果你能提供给我关于这两点一些指针/方法1和2

Folks would be really grateful if you can provide me some pointer/approach regarding both points 1 and 2

推荐答案

要包含在电子邮件中的图像,首先你要的影像,作为MIME附件的电子邮件。每个附件都必须有一个内容ID标头。

To include images in the email message, first you have to include the images as MIME attachments in the email. Each of these attachments must have a "Content-ID" header.

--f46d0444ea0d6991ba04b91c92e6
Content-Type: image/gif; name="theImage.gif"
Content-Transfer-Encoding: base64
Content-ID: <theImage@abcd>

[base64 string]
--f46d0444ea0d6991ba04b91c92e6--

2)然后,在电子邮件信息,包括内容ID在&LT的的src 属性; IMG&GT; 标记。

2) Then, in the email message, include the Content-ID in the src attribute of the <img> tag.

<img src="cid:theImage@abcd" />

这篇关于有些问题涉及到的电子邮件签名里面实现的形象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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