for f in result[1]:
print f
break
for value in f.values():
lines = lines+str(value.encode('utf-8'))+ 'n'
msg = lines
login = mailfrom
password = "vccdljyfcpmqjkma"
context = ssl.create_default_context()
server = smtplib.SMTP_SSL("smtp.yandex.ru", 465)
server.login(login, password)
server.sendmail(mailfrom, mailto, msg)
server.quit()