我會在下面顯示一個嵌入圖像的電子郵件代碼,並通過其「src」屬性在「img」標籤上引用該圖像,這是正常的,但該圖像是其中一個附件,可通過「cid:」前綴,我認爲它的意思是「內容ID」。下面是否存在一個特定的HTML語言用於電子郵件?
是電子郵件的主體
<IMG border=3D0 hspace=3D0 alt=3D"" =
align=3Dbaseline=20
src=3D"cid:[email protected]">
的IMG現在部分內容ID
------=_NextPart_000_0007_01CE9B3A.AC5A71A0
Content-Type: image/jpeg;
name="sample.JPG"
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
我得到了這個源沒有問題,完全沒有問題。但是我不知道這個特性是否會將HTML語言轉換成特定的HTML語言,僅僅用於電子郵件,以及這種特定的語言是否有名稱。
讓做問:
1)是一種特定的語言? 2)他叫什麼名字? 3)在哪裏可以找到關於他的文檔?
完整的電子郵件下面的代碼:
From: "paulo" <[email protected]>
To: "[email protected]"
Subject: sample of email specific html
Date: Sat, 17 Aug 2013 11:12:28 -0300
MIME-Version: 1.0
Content-Type: multipart/related;
type="multipart/alternative";
boundary="----=_NextPart_000_0007_01CE9B3A.AC5A71A0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Unsent: 1
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01CE9B3A.AC5A71A0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0008_01CE9B3A.AC5A71A0"
------=_NextPart_001_0008_01CE9B3A.AC5A71A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
a text and below the image
------=_NextPart_001_0008_01CE9B3A.AC5A71A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.23501">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2 face=3DArial>a text and below the image</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><IMG border=3D0 hspace=3D0 alt=3D"" =
align=3Dbaseline=20
src=3D"cid:[email protected]"></FONT></DIV></BODY>=
</HTML>
------=_NextPart_001_0008_01CE9B3A.AC5A71A0--
------=_NextPart_000_0007_01CE9B3A.AC5A71A0
Content-Type: image/jpeg;
name="sample.JPG"
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAVABUDASIA
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm
p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA
AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx
BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK
U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3
uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD2vUdf
sdNvbeylaR7md41CRrkIHfYrOxwqAnO3cQXKlUDN8tGta0NESGaWwu57d3CyTQGMiHLKq5VnDuSW
wFjV2J4AJIB1Ky9Jg1qK41CTVr20niluGa0ht4Cn2eIEhVZyfnJUKx4GGZgCRtwAaEE8N1bxXFvL
HNBKgeOSNgyupGQQRwQRzmipKKAI54Ibq3lt7iKOaCVCkkcihldSMEEHggjjFZemeFdC0TUZb7Sd
MgsJpohDItoDFG6gkgmNcIWBJ+YjdgkZxxRRQBsUUUUAf//Z
------=_NextPart_000_0007_01CE9B3A.AC5A71A0--
在此先感謝
http://stackoverflow.com/questions/4312687/how-to-embed-images-in-email –
這是「正常的」HTML - 你通常不使用它,因爲它更容易和更好通過使用src屬性來包含圖像,但是您也可以(如您的郵件和我發佈的鏈接所示)將圖像數據包含在您的HTML代碼中 - 是什麼使文件變大,但如果您想發送郵件,是包含本地圖像而不是鏈接到外部圖像的唯一方法。 –
真的嗎?在正常的HTML中,我可以創建內容部分?那麼,你能給我鏈接的文檔點?我在尋找,但如果你掌握了它,將會更快,更容易。如果您確信這一點,請提供您的答案,我會接受!非常感謝 – user2092868