sending emails in python weird behaviour
问题 I am working on a piece of code that regularly sends emails from 4 different accounts, 2 of them are gmail accounts and the other 2 are yahoo accounts. When I started writing the code I was able to send all the emails from both the gmail accounts using the following piece of code: def sendGmail(self, fromaddr, toaddr, username, password, email_body, email_subject ): # Build the email msg = MIMEText(email_body) msg['Subject'] = email_subject msg['From'] = fromaddr msg['To'] = toaddr try: # The