Arduino Yun Python ImportError: No Module named mime.multipart
mime.multipart isnt used in your code at all so you shouldn't be getting that error. The correct import statements for Python 2.7 are:

from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
from email.encoders import Encoders


Study these examples in the Python 2.7 documentation.