import smtplib
server = smtplib.SMTP('smtp.free.fr', 587) # 465

#Next, log in to the server
server.login("youremailusername", "password")

#Send the mail
msg = "\nHello!" # The /n separates the message from the headers
server.sendmail("patrice.delpy@free.fr", "target@example.com", msg)
