I made this code to send emails via a proxy and the code finishes fine, but when I go to the show original tab in gmail, it shows my original Ip Address not changed, where is the problem in my code? Thanks
import smtplib
import pandas as pd
from time import sleep
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
import random
import socks # pip install pysocks
strFrom = 'testing@gmail.com'
emails = ('test1@gmail.com','test2@gmail.com')
msgRoot = MIMEMultipart('related')
msgRoot['Subject'] = 'test message'
msgRoot['From'] = strFrom
msgRoot.preamble = 'This is a multi-part message in MIME format.'
msgText = 'schedule for tomorrow'
ip2 = 'xx.xxx.xx.121'
port2 = '8811'
for email in emails:
socks.setdefaultproxy(socks.SOCKS5, ip2, int(port2))
socks.wrapmodule(smtplib)
server = smtplib.SMTP("smtp.gmail.com:587")
server.starttls()
server.login(strFrom, 'password')
print("From:",strFrom)
server.sendmail(strFrom, email, msgText)
print("To:",email)
server.quit()
sleep(10)