How to configure localhost in python?

The project should be able to send email from Python. I can successfully send, for example, "smtp.gmail.com", but using localhost or 127.0.0.1 returns "errno 111, the connection was rejected." Statement

    server = smtplib.SMTP('127.0.0.1', 8025)

Notes: I am running Ubuntu, Python 3.2, or Python 2.7 depending on what wonderful people here know best, and my programming knowledge may be kindly described as limited.

+3
source share
2 answers

SMTP- Telnet. ( ) , SMTP- , .

, :

  • SMTP ;
  • SMTP, /;
  • SMTP , SMTP → ;
  • DNS ;
  • SMTP- Python.

Python SMTPlib LMTP 2.

25 5.

SMTP-.

BTW: SMTP- ...

+1

, , SMTP-. Ubuntu - exim4 postfix- apt/synaptic...

, , , , . , , .

, smtp - 25, 8025, .

+1

All Articles