Python 2: SMTPServerDisconnected: Connection unexpectedly closed
TLDR: switch to authenticated connection over TLS. Most probably the gmail server rejected the connection after the data command (very nasty of them to do so at this stage :). The actual message is most probably this one: retcode (421); Msg: 4.7.0 [ip.octets.listed.here 15] Our system has detected an unusual rate of 4.7.0 unsolicited mail … Read more