Well that's very nice of Python to have an SMTP server module.
I did a very similar thing in the past that was an email-sms proxy with the email end being a Postfix email server. It was incredibly painful configuring postfix to pipe emails directly into a Go program I had written. All the docs were close but none got me all the way there. Neat to see how much easier it could have been.