import smtplib, ssl
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
sender_email = "email@gmail.com"
password = "#########"
message = MIMEMultipart("alternative")
message["Subject"] = "subject"
message["From"] = sender_email
message.add_header('Content-Type', 'text/html')
html = "html text"
part2 = MIMEText(html, "html")
message.attach(part2)
context = ssl.create_default_context()
with smtplib.SMTP_SSL("smtp.gmail.com", 465, context=context) as server:
server.login(sender_email, password)
server.sendmail(
sender_email, 'cdfv@aol.com', message.as_string()
)
the code executed successfully the problem is that Gmail block after certain sending the program. So how can I send to unlimited accounts.I used Gmail directly but the number of recipients is limited