可以创建一个挂钩来在 pyinstaller 执行中发送电子邮件吗?
It's possible to create a hook to send an email in pyinstaller execution?
我想在执行pyinstaller
时总是给我发邮件。[=11=]
可能吗?
您可以在 python 代码中使用 smtplib 库来发送电子邮件。和描述的一样here
但是,由于它需要网络连接,当基于 pyinstaller 的应用程序 运行 时,您不能始终保证用户计算机上的网络可用。
如果网络不可用,您可以检查网络连接并使程序执行失败(使用适当的用户消息)。
我想在执行pyinstaller
时总是给我发邮件。[=11=]
可能吗?
您可以在 python 代码中使用 smtplib 库来发送电子邮件。和描述的一样here
但是,由于它需要网络连接,当基于 pyinstaller 的应用程序 运行 时,您不能始终保证用户计算机上的网络可用。
如果网络不可用,您可以检查网络连接并使程序执行失败(使用适当的用户消息)。