Category Archives: Administrative

Email Issue

I’m trying to send myself email from my own Linux machine, via SMPT. I’ve written the following Python program:

#!/usr/bin/env python3

# Import smtplib for the actual sending function
import smtplib

# Import the email modules we’ll need
from email.mime.text import MIMEText

# Open a plain text file for reading. For this example, assume that
# the text file contains only ASCII characters.
with open(“test.txt”) as fp:
# Create a text/plain message
msg = MIMEText(fp.read())

# me == the sender’s email address
# you == the recipient’s email address
msg[‘Subject’] = “Test”
msg[‘From’] = “simberg@interglobal.org”
msg[‘To’] = “simberg@interglobal.org”

# Send the message via our own SMTP server.
s = smtplib.SMTP(‘localhost’)
print(“s has been opened”)
s.send_message(msg)
print(“after send_message”)
s.quit()
print(“End script”)

It runs with no errors, prints the statements to the terminal, but no email appears. How do I diagnose this?

[Update a while later]

Thanks for the help in comments. Still haven’t solved it, but the need for the application that I needed it for has gone away. Nonetheless, it would be good in general to know how to email from a Python script.

Light Posting

…may continue until Monday night. We’re in Stinson Beach for the weekend for a mini-vacation.

[Sunday-evening update]

We have no television here, other than a big screen with a DVD player, but I’m not sure I’d watch the president’s latest attack on the American people even if I did.

Back In LA

I was scheduled to come home this evening, but I had no other business in Seattle, and it turned out that Alaska lets you change flights same day for only $25, so I actually caught a 6 AM flight.

The bad news is that Fedora doesn’t seem to want to boot into the 4.2.5 kernel, in either Fedora 22 or Fedora 23 (I hoped upgrading to the latter would fix). It just bombs out and loops in a continual effort to boot. I had to revert to 4.1 to boot it. Not sure how to diagnose. I’ve seen hints that others are having similar problems in the Fedora fora, but no indication of what to do about it.

In Seattle

I had a long trip to get here, starting at 2:30 AM Central (two-hour bus ride from Columbia MO to St. Louis, two-hour plane ride to Charlotte, five-hour plane ride to Seattle), but I’m at the Museum of Flight, where I’ll be giving a talk and book signing tomorrow, for any Seattlites who want to show up. It’s $20 admission to the Spacefest, but it’s an opportunity for a signed book if you don’t have one.

I’ve never been here this time of year. I was surprised at the fall colors.

Back In Missouri

We drove back to Columbia today from west of Ann Arbor, after visiting family and friends up there. Initially took back roads, not the freeway, as we were trying to catch the last of the fall colors. I took Route 12 from south of Manchester all the way to Coldwater, through the Irish Hills which, despite having been raised in southeast Michigan, I’d never done, so if I had a bucket list, I’d cross that one off. Lovely (but looking a little depressed in off-season), and Michigan International Speedway was impressive from a distance.

From there we headed south to Fort Wayne, went east on 24 across northern Indiana. The plan was to go to Peoria, then continue down to Hannibal, but we realized that we would run out of light (and butt stamina in the car) long before we ran out of road, so we bailed not long after getting into Illinois, and took 57 south to 72, then 55 south to 270, then 370, then 70 west to Columbia. Got in about 7:30. Always nicer to gain an hour from the time change than losing it (we got into Michigan about 10 PM when we drove up Friday).

Anyway, here until Friday when I fly to Seattle for a book signing at the Museum of Flight on Saturday. Hope locals can make it.