The Multipurpose Internet Mail Extension (MIME) provides email servers the ability to send non ASCII data over SMTP.
A MIME message has headers explaining the content and can have multiple parts with different encoding. Typically, MIME encodes images in base64.