It is easy to attach a picture in an email, from user's perspective, of course. But, what is actually sent over the Internet to the recipient server? There are 2 types how a picture can be transmitted over an email, as inline picture, or as an attachement. Before they are transfer over, they need to go through some conversion, that is binary-to-text encoding called Base64. Say, the binaries of the image starts with FF D8 FF , and the translation process can be as below : Original binaries FF D8 FF Regroup the binaries 111111 111101 100011 111111 Associate decimal 62 61 35 63 From the Base64 index table / 9 j / Inline image To send as an inline, the email message shall have the following attributes. Content-Type: image/gif; name=" file name " Content-Transfer-Encoding: base64 X-Attachment-Id: image-id Content-ID: < image-id > Followed by the image binaries in Base64. The attributes and the image binaries is placed withi...
Previously known as jcrys26's kdb. A learning dump and sharing place.