Skip to content

Instantly share code, notes, and snippets.

@mp998
mp998 / PlexPy_email_notifiation.py
Last active July 6, 2018 05:51
This script will allow you to send a detailed email with PlexPy when new media is added to your PLEX server. Tested and works well with TV shows and movies. Not sure what will happen with music but its worth giving it a shot.
from email.mime.text import MIMEText
import email.utils
import smtplib
import sys
# Arguments passed from PlexPy
# {show_name} {episode_name} {season_num00} {episode_num00} {server_name} {media_type} {poster_url} {title} {summary} {library_name}
show_name = sys.argv[1]
# You can add more arguments if you want more details in the email body
episode_name = sys.argv[2]