0
0 комментариев

Доброго времени суток.
Win10x64, Python 3.7

[apcode language=»python»]

import smtpd
import asyncore
  class CustomSMTPServer(smtpd.SMTPServer):
     def process_message(self, peer, mailfrom, rcpttos, data):
        print('Receiving message from:', peer)
        print('Message addressed from:', mailfrom)
        print('Message addressed to :', rcpttos)
        print('Message length :', len(data))
  server = CustomSMTPServer(('127.0.0.1', 25), None)
 asyncore.loop()

[/apcode]

Получаю ошибку:

[apcode language=»plain»]

error: uncaptured python exception, closing channel (:process_message() got an unexpected keyword argument 'mail_options' [c:\python37\Lib\asyncore.py|read|83] [c:\python37\Lib\asyncore.py|handle_read_event|422] [c:\python37\Lib\asynchat.py|handle_read|171] [c:\python37\Lib\smtpd.py|found_terminator|386])

[/apcode]

Письмо отправляю так:

[apcode language=»plain»]

blat.exe -body "body" -to "test@example.com" -f voip1@acc.lan -charset utf-8 -s "Subject text" -server localhost -log blat.log -timestamp

[/apcode]

На выходе:

[apcode language=»plain»]

2019.12.04 10:38:59 (Wed)------------Start of Session-----------------
Blat v3.2.22 (build : Jul 19 2019 23:25:54)
64-bit Windows, Full, Unicode
2019.12.04 10:38:59 (Wed): Sending stdin.txt to test@example.com
2019.12.04 10:38:59 (Wed): Subject: Subject text
2019.12.04 10:38:59 (Wed): Login name is voip1@acc.lan
2019.12.04 10:38:59 (Wed): Error: Connection to server was dropped.
2019.12.04 10:38:59 (Wed): *** Error *** Message not accepted by server
2019.12.04 10:38:59 (Wed)-------------End of Session------------------

[/apcode]

Отменить выбор ответа
Добавить комментарий