Q:

How to Send Emails with Gmail using Python

How to send email with Python tried two methods Method without username, password and other username and password but Google blocker
import smtplib

content = "anything"
server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.login("Your_Username", 'Your_Password')
server.sendmail('Your_Username', "usamnet000@gmail.com", content)
server.close()

A:

You may have left the Gmail account with block less secure apps on. This means Gmail will reject email sent by any less secure programs, and block your email. I highly recommend this tutorial, which will go through everything from setting up your Gmail account for the program. 

