Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

use proxy to connect smtp python

import smtplib
import socks

#'proxy_port' should be an integer
#'PROXY_TYPE_SOCKS4' can be replaced to HTTP or PROXY_TYPE_SOCKS5
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, proxy_host, proxy_port)
socks.wrapmodule(smtplib)

smtp = smtplib.SMTP()
...
Comment

PREVIOUS NEXT
Code Example
Python :: cv2 check if image is grayscale 
Python :: convert list to string separated by comma python 
Python :: add a new column to numpy array 
Python :: time in python code 
Python :: lambda and function in python 
Python :: discord py fetch message 
Python :: pandas line plot dictionary 
Python :: pythagorean theorem python 
Python :: rename column by indexing 
Python :: check django version windows 
Python :: python json to dict 
Python :: python tkinter ttk 
Python :: message handler python telegram bot example 
Python :: pandas nat to null? 
Python :: python extract email attachment 
Python :: input function python 
Python :: raw input example py 
Python :: Change Python interpreter in pycharm 
Python :: remove string from list in python 
Python :: Python random integer number between min, max 
Python :: python code to demonstrate inheritance 
Python :: numpy array divide each row by its sum 
Python :: find nan values in pandas 
Python :: pandas divide multiple columns by one column 
Python :: Python Tkinter PanedWindow Widget 
Python :: numpy concatenation array 
Python :: concact geodataframe python 
Python :: Username Promt using Python with Character Limit 
Python :: how to print out even index in python 
Python :: axios django post data 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =