Python 3 - 503 Error: send HELO first
aldur opened this issue · comments
Adriano Di Luzio commented
On Python 3 I've got the following error while trying to send any mail: 503 Error: send HELO first
.
I managed to investigate the source and it appears to be as follows.
You subclass smtpd.SMTPChannel
and override the method smtp_EHLO
.
In the CPython implementation of this method the instance variable self.seen_greeting
is set and then, in the smtp_RCPT
method, there is a check on that same variable (relevant code here).
This check fails and trigger the error.
As far as I can see, there is no need to override the smtp_EHLO
method.