Saturday, January 9, 2010

SMTP and MIME

Hi,
Im writing after a long time.Y? Its just because i didn't learn anything new or found anything interesting to write. So , today while browsing I can across an interesting topic..

People studying engineering would know what is SMTP. But, few people know about MIME.As a student, I only knew MIME had something related to email header. So here we go.

SMTP or Simple Mail Transfer Protocol is used to send emails.These emails contain plain text and nothing else( It is because when SMTP was formulated in 1982, it had support only for US-ASCII characters).Now, when we send an email, we know that MIME adds a header to email, divides email into parts and does other technical stuff. But what if your email contains a binary file attachment? How will SMTP send the email since it contains binary information????

Now this is resolved by MIME. MIME( Multipurpose Internet Mail Extension) uses an algorithm "Base64" which does this encoding. This algorithm encodes the information, whether image,media or whatever into a form which can be understood by decoding at the recipient's end.