Apr-28-2021, 07:50 PM
(Apr-27-2021, 08:29 AM)snippsat Wrote: Fixed your code tag look at BBCode
Add this to see the actual smtp conversation before it raise error.
server = smtplib.SMTP('smtp.gmail.com', 587) server.set_debuglevel(1) server.ehlo()
thanks for that line of code.
I have the login in the loop so the message is saying too many login attempt.
I move the login code out of the loop and now I got another error message.
Error: File "<ipython-input-56-9108101ba83e>", line 24, in <module>
server.sendmail(gmail_sender, [TO], BODY)
File "C:\ProgramData\Anaconda3\lib\smtplib.py", line 871, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
SMTPSenderRefused: (421, b'4.7.0 Try again later, closing connection. (MAIL) a189sm523022qkd.46 - gsmtp',