sending email in python with gmail

A {{Python}} nugget from {{Programming Your Home}} (review) I wanted to share from p97: import smtplib def send_email(subject, message) recipient = ‘your_email_recipient@domain.tld’ gmail_sender = ‘your_gmail_account@gmail.com’ gmail_password = ‘your_gmail_password’ #use tls gmail_smtp = smtplib.SMTP(‘smtp.gmail.com’, 587) gmail_smtp.ehlo() gmail_smtp.starttls() gmail_smtp.ehlo() #login gmail_smtp.login(gmail_send, gmail_password) #message formatting mail_header = ‘To: ‘ + recipient + ‘\n’ + ‘From: ‘ + gmail_sender …
Continue reading sending email in python with gmail

more coolidge

More choice excerpts from {{Coolidge}} by {{Amity Shlaes}} (review): The constant apprehension was, so long as then-existing legislation remained in force, that the unit of existing monetary relations would be changed. Such an apprehension is the surest ground for panic which can be offered. The panic which resulted when this fear became more specific was …
Continue reading more coolidge

the art of the essay

Paul Graham is one of my favorite essayists. The following are some excerpts from his excellent 2004 essay, “The Age of the Essay“. The most obvious difference between real essays and the things one has to write in school is that real essays are not exclusively about English literature. Certainly schools should teach students how …
Continue reading the art of the essay

abstracts from ‘the art of seduction’

Yesterday I promised you can read the abstracts from {{Robert Greene}}’s {{The Art of Seduction}} today. Part One – The Seductive Character The Siren A man is often secretly oppressed by the role he has to play – by always having to be responsible, in control, and rational. The Siren is the ultimate male fantasy …
Continue reading abstracts from ‘the art of seduction’

virtualization myth – reduction of servers

Ars Technica has had a great series of articles recently on virtualization (1 2 3 4 5). But a statement made in part 5 repeated what has been too-often stated as a benefit of virtualization: the reduction of servers, and associated management tasks – The benefits of performing a large-scale P2V conversion are pretty clear: …
Continue reading virtualization myth – reduction of servers

from `fortune`

The five rules of Socialism: (1) Don’t think. (2) If you do think, don’t speak. (3) If you think and speak, don’t write. (4) If you think, speak and write, don’t sign. (5) If you think, speak, write and sign, don’t be surprised. — being told in Poland, 1987