
import smtplib as server
connect = server.SMTP("smtp.gmail.com:587")
connect.starttls()
connect.login('usernamehere', 'passwordhere')
connect.sendmail('usernamehere', 'targetemail', and here you can write the contents of your txt as the message)