From: php@php.net
To: 'Alex (the Great)'
Subject: Bucephalus
MIME-Version: 1.0
Hello Alexander,
How's Bucephalus doing?
这里面没有什么,它只是一个简单的拥有MIME头的符合RFC-822 的信息(文
本邮件)。注意,如果没有指定Content-Type头,则假设为Content-Type: text
/plain;charset='us-ascii'!当然,它有些简单,复杂一些的如下:
From: 'Alex (the Great)'
To: php@php.net
Subject: re: Bucephalus
MIME-Version: 1.0
Content-Type: image/jpg;
name='buce.jpg'
Content-Transfer-Encoding: base64
Content-Description: Take a look at him yourself
Attached you will find my horse, Bucephalus', pedigree chart and photo
.
Alex
--XX-1234DED00099A
Content-Type: image/jpg;
name="buce.jpg";
Content-Transfer-Encoding: base64
Content-Description: "A photo of Bucephalus"
<.....base64 encoded jpg image of Bucephalus...>
--XX-1234DED00099A
Content-Type: application/octet-stream;
name="pedigree.doc"
Content-Transfer-Encoding: base64
Content-Description: "Pedigree Chart of the great horse"
<.....base64 encoded doc (pedigree.doc) of Bucephalus...>