0

I am succesfully sending emails through gmail app password, python and smtplib.

I am attempting to add proxy support to my script, but I am getting hit by the following error message:

socks.GeneralProxyError: Socket error: 0x02: Connection not allowed by ruleset

Here are the relevant parts of my script:

socks.set_default_proxy(socks.SOCKS5, host, port, True, user, passw)
socks.wrapmodule(smtplib)

session = smtplib.SMTP('smtp.gmail.com', 587)
session.login(sender_address, sender_pass) 
Ned Hulton
  • 477
  • 3
  • 12
  • 27

0 Answers0