Forums

Yahoo mail connection refused

Hello, I'm trying to send an email using the yahoo smtp server on my application. It works perfectly locally, but gives this error on pythonanywhere: Error running WSGI application 2024-12-11 17:00:00,472: ConnectionRefusedError: [Errno 111] Connection refused

Is there something I'm doing wrong? How do I fix this?

Free accounts on PythonAnywhere have restricted Internet access; you can only make outbound HTTP or HTTPS requests, they have to go through a proxy, and they can only be to the sites on this list. There are two exceptions to that -- we do allow outbound connections to Gmail's SMTP servers and to GitHub via SSH to allow cloning repositories. But Yahoo Mail is not on the list, and we're not planning to add it.