App Engine blocks this kind of connection which opens socket.
You have 2 options if you want to send mails on Google App Engine:
Directly use Mail API provided by Google App Engine, it will be a set of API that handles mailing on Google App Engine, for reference you can look here: Google App Engine Mail API for Python
Use Django wrapper for GAE Mail API, like the one built in in
rocket_engine
or standalone one.
If you're doing this you can perform email sending in the same way of what Django does, it's more like a plugin could be installed into your Django project, then your settings will work without any change.