import smtplib
from email.mime.text import MIMEText
def send():
    sender =input('your qq mail:')
    receiver =input('you will send mail:')
    psw =input('your mail passworl:')
    content =input('mail body text:')
    msg = MIMEText(content)
    msg['From'] =input('your name:')
    msg['Subject'] =input('mail title:')
    msg['To'] = receiver
    try:
        server = smtplib.SMTP_SSL('smtp.qq.com',465)
        server.login(sender,psw)
        server.sendmail(sender,receiver,msg.as_string())
        server.quit()
        print("send already")
    except:
        print("fail")
    return
if __name__=='__main__':
    print(__name__)
    send()
