E
E
Elnur Tazhimbetov2018-10-31 17:51:02
Python
Elnur Tazhimbetov, 2018-10-31 17:51:02

How to make an .exe from a .py that sends an email to the mail?

There is such a code

import smtplib

server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.login("from", "pass")
msg=""
file = open("testfile.txt", "r") 
for line in file:
    message=""
    for i in range(0, len(line)):
        message = message + chr(ord(line[i]) - 4)
    msg+=message+'\n'

print(msg)
server.sendmail("[email protected]", "[email protected]", msg)
server.quit()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Segey K., 2018-10-31
@tazhimbetov

pyinstaller
Only you need to compile under Windows on Windows, well, at least on Ubuntu I didn’t manage to compile a working exe-shnik under Windows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question