This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GetSDO.py | |
# | |
# A basic Python script to download the latest image from NASA's Solar Dynamics | |
# Observatory RSS feed. | |
# | |
# I use it to set the screensaver image source on my Mac | |
# | |
# More 'advanced' development will continue at: https://github.com/mint5auce/getSDO | |
# | |
# Requires: Universal Feed Parser (https://github.com/kurtmckee/feedparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import smtplib | |
import socket | |
from email.mime.text import MIMEText | |
import datetime | |
# Change to your own account information | |
to = 'me@example.com' | |
gmail_user = 'test@gmail.com' | |
gmail_password = 'yourpassword' | |
smtpserver = smtplib.SMTP('smtp.gmail.com', 587) |