简体   繁体   中英

Securely Send Email from Python Executable

I'm working on a Python tool for wide distribution (as .exe/.app) that will email reports to the user. Currently (in testing), I'm using smtplib to build the message and send it via GMail, which requires a login() call. However, I'm concerned as to the security of this - I know that Python binaries aren't terribly secure, and I'd rather not have the password stored as plaintext in the executable.

I'm not terribly familiar with email systems, so I don't know if there's something that could securely be used by the .exe. I suppose I could set up a mail server without authentication, but I'm concerned that it'll end up as a spam node. Is there a setup that will allow me to send mail from a distributed Python .exe/.app without opening it to potential attacks?

One possible solution is to create a web backend mantained by you which accepts a POST call and sends the passed message only to authorized addresses. This way you can also mantain the list of email addresses on your server.

Look at it like an online error alerter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM