Q:

How to solve the ConnectionRefusedError: [WinError 10061] the target machine actively refused it? ( Django SMTP)

I have read many solution tried to implement but no luck. Please suggest to fix this issue and below are the things implemented in my code. 
In views.py file
    s = smtplib. SMTP(IP Address, Port)
    s.ehlo()
    s.sendmail("a@b.com", 'c@d.com', msg.as_string())
    print("printing the S object", s.__dict__)
    s.quit()

Output I am getting:
Connection refused error.  win [16001]
Using windows platform, i don't have admin rights, Firewall is disabled. 

A:

Workarounds you can do for this 
* check whether you have permission to connect to SMTP server. You can try netcat or telnet. 
* If you are unable to connect to SMTP you have to make sure your local ip should be enabled. 
Try with this options which can help you connect SMTP.