Just yesterday I finished working on the contact section of this website. Before working on it I listed the requirements. First of all I needed to have a fast way to check if someone had written me something from this website. And second of all my information must be kept private so I do not receive spam by telephone or mail.
After thinking of some of the options to fulfill these needs I decided to make this webpage send me mail to my inbox. Here is the solution I used.
First of all I created another gmail account ( the one that will actually send me mail). Then I did some reasearch in google and discovered the code to send me mail from within python. Here it goes
import smtplib
from_address = "my_username@gmail.com"
to_address = "destination@gmail.com"
message = "To : " + to_address + "n From : " + from_address + "n Subject : test mail nn This is the body of the mail"
# As google requires SSL I will use the SMTP_SSL
mail = smtplib.SMTP_SSL("smtp.gmail.com", 465)
mail.login("my_username@gmail.com", "my_password")
mail.sendmail(from_address, to_address, message)
And that is all you really need to know to send mail from within python