def emailto(adress, smtp_server='mail.server.ru', message='', header=''):
msg = MIMEText(message, 'plain', 'cp866')
msg['Subject'] = email.Header.Header(header, 'utf-8')
me = 'robot@server.ru'
msg['From'] = me
msg['To'] = adress
msg['Content-Type'] = 'multipart/alternative;'
s = smtplib.SMTP()
s.connect(smtp_server)
you = adress
s.sendmail(me, you, msg.as_string())
s.close()
замена
msg = MIMEText(message, 'plain', 'cp866')
msg = MIMEText(message, 'multipart/alternative;', 'cp866')