Apr-27-2021, 02:11 AM
(This post was last modified: Apr-27-2021, 08:25 AM by snippsat.
Edit Reason: Fix code tag
)
Hello,
I created a program, it sends email fine.
However there is a limit (100) in the number of emails it can send before it crashed and gives
an error.
Does someone know what is going on ?
Thanks !
I created a program, it sends email fine.
However there is a limit (100) in the number of emails it can send before it crashed and gives
an error.
Does someone know what is going on ?
Thanks !
server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.login(gmail_sender, gmail_passwd)
BODY = '\r\n'.join(['To: %s' % TO, 'From: %s' % gmail_sender, 'Subject: %s' % SUBJECT, '', TEXT])
server.sendmail(gmail_sender, [TO], BODY)the error message is. Error: File "C:\ProgramData\Anaconda3\lib\smtplib.py", line 398, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed
