Sendmail Errno[61] Connection Refused

前端 未结 7 1130
不思量自难忘°
不思量自难忘° 2021-01-31 08:28

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         


        
7条回答
  •  终归单人心
    2021-01-31 08:33

    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.

提交回复
热议问题