Is it possible to set up an email server in Spaces?

The following code does not seem to work in spaces, although it works on my laptop:

server = smtplib.SMTP("", port=587)
server.login("<my email>", <my email password>)

It returns the following error:

OSError: [Errno 99] Cannot assign requested address

Thanks for any advice you can provide!