I\'ve been trying to get my application to mail some outputted text to an email. For simplification I have isolated the script :
import smtplib
import sys
import
If you are root on your system then you may want to install opensmtpd
. First this way you don't need to run the server manually (this service is enabled by default so after smtpd
installation either start it manually or reboot your machine). Second, you don't need to change the line server = smtplib.SMTP(SERVER)
. To conclude, use yum install opensmtpd
or the equivalent apt-get
command.