File: smtpserver-4.tac

package info (click to toggle)
twisted-mail 10.1.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,032 kB
  • ctags: 2,704
  • sloc: python: 13,969; makefile: 60; sh: 9
file content (14 lines) | stat: -rw-r--r-- 409 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from twisted.application import service

application = service.Application("SMTP Server Tutorial")

from twisted.application import internet
from twisted.internet import protocol

smtpServerFactory = protocol.ServerFactory()

from twisted.mail import smtp
smtpServerFactory.protocol = smtp.ESMTP

smtpServerService = internet.TCPServer(2025, smtpServerFactory)
smtpServerService.setServiceParent(application)