Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29748

how can i send emails to unlimited recipients programmatically from my gmail account at once [closed]

$
0
0
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


Viewing all articles
Browse latest Browse all 29748

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>