Something like that would be amazing! sounds similar to PlexRequest
Those were the instructions for installing on mac (note that you will have to open up the command line). Follow the readme on how to configure the config file and feel free to ask me any questions (just give me info on what you are looking for it to do).
After you use nano to modify the config file, you can test it by running:
python PlexEmail/scripts/plexEmail.py -t
Once you get that far I can help you with setting up a cron job.
Lol I’m an idiot, I would assume I could just run the python script in terminal whenever I want the email to go out? Is that correct.
OK well I sort of have it set-up on mac, but I’m getting syntax errors when it runs in the “email_to” setting, it doesn’t like the ’ or the @ in the email address. I don’t want to hit all users, not at least until I see the email works.
@jlomaga said:
OK well I sort of have it set-up on mac, but I’m getting syntax errors when it runs in the “email_to” setting, it doesn’t like the ’ or the @ in the email address. I don’t want to hit all users, not at least until I see the email works.
The error output should show a line number on which the error occurred etc., can you copy/paste that error?
The error output should show a line number on which the error occurred etc., can you copy/paste that error?
Here is the error
SyntaxError: invalid syntax
XXX-Mac-Pro:Applications mac$ python PlexEmail/scripts/plexEmail.py -t
Traceback (most recent call last):
File “PlexEmail/scripts/plexEmail.py”, line 791, in
execfile(configFile, config)
File “/Applications/PlexEmail/scripts/config.conf”, line 42
email_to = [‘XXXX@gmail.com’]
Here is that part of the config;
##Email
email_enabled = True
email_individually = True
email_use_bcc = False
# [‘email1@gmail.com’, ‘email2@hotmail.com’]
email_to = [‘XXX@gmail.com’] #This requires plex_username and plex_password to be filled to get emails of shared users.
email_to_send_to_shared_users = False
email_unsubscribe = [‘’]
email_from = ‘XXXX@gmail.com’
email_from_name = ‘XPlex’
email_smtp_address = ‘smtp.gmail.com’
email_smtp_port = 587
email_use_ssl = False #Port must be an SSL port i.e. 465
email_username = ‘XXXXX@gmail.com’
email_password = ‘XXXXXX
# Only valid if web_enabled = True and upload_use_cloudinary = False
email_use_web_images = True
email_skip_if_no_additions = False
Please be aware the smart quotes seem to have appeared on every line you edited, maybe you should either disable smart quotes or use another editor to avoid an uphill battle
Ok the config issues are now fixed, thank you. Also when I run the script it uploads art to cloudinary, confirmed via their dashboard. However I’m getting a python error similar to a person 2 pages back when it tries to send the email.
I created a new Outlook account, since my gmail accounts use 2-factor.
SSL is enabled in config
FIGURED IT OUT!!! Set port to 587 and SSL set to False works perfectly.
And I lied, it only emails myself, I have my plex account info in the config and email to share suggested, but it only emails the sending address. I also tried individual emails same issue.
##Email
email_enabled = True
email_individually = True
email_use_bcc = True
# ['email1@gmail.com', 'email2@hotmail.com']
email_to = ['1@gmail.com', '2@gmail.com']
#This requires plex_username and plex_password to be filled to get emails of shared users.
email_to_send_to_shared_users = True
email_unsubscribe = ['']
email_from = 'name@outlook.com'
email_from_name = 'name'
email_smtp_address = 'smtp-mail.outlook.com'
email_smtp_port = 587
email_use_ssl = False #Port must be an SSL port i.e. 465
email_username = 'name@outlook.com'
email_password = 'password'
# Only valid if web_enabled = True and upload_use_cloudinary = False
email_use_web_images = True
email_skip_if_no_additions = False
@jlomaga said:
And I lied, it only emails myself, I have my plex account info in the config and email to share suggested, but it only emails the sending address. I also tried individual emails same issue.
Do you perhaps still use the -t parameter for testing, like this? python PlexEmail/scripts/plexEmail.py -t
If so, try without the test parameter. Like this: python PlexEmail/scripts/plexEmail.py
@jlomaga said:
And I lied, it only emails myself, I have my plex account info in the config and email to share suggested, but it only emails the sending address. I also tried individual emails same issue.
Do you perhaps still use the -t parameter for testing, like this? python PlexEmail/scripts/plexEmail.py -t
If so, try without the test parameter. Like this: python PlexEmail/scripts/plexEmail.py
I was using the -t, I’m sure that is the cause, I will test it out later tonight.
`C:\PlexEmail-0.8.1\scripts>plexemail.py -t
Web page created successfully
Traceback (most recent call last):
File "C:\PlexEmail-0.8.1\scripts\plexEmail.py", line 1533, in <module>
sharedEmails = getSharedUserEmails()
File "C:\PlexEmail-0.8.1\scripts\plexEmail.py", line 291, in getSharedUserEmails
response = requests.post(url, headers=headers)
File "C:\Python27\lib\requests\api.py", line 99, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Python27\lib\requests\api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\requests\sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\requests\sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\requests\adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(10060, 'A connection attempt fail
ed because the connected party did not properly respond after a period of time, or established conne
ction failed because connected host has failed to respond'))`~~~~~~
My issue is I have configured PlexEmail to run perfectly with no errors and have specified the right folders. The problem is it will not notify me when I clearly make massive changes to the library folders. My emails come in as “No changes have been made” I made sure that I was not filtering any folders, but I cannot for the life of me seem to get it to work the emails will always say “No changes have been made”. I thought that it may connect to the SQL back-end incorrectly since a plex update or something but clearly it is working for you guys.
@Mark7even said:
My issue is I have configured PlexEmail to run perfectly with no errors and have specified the right folders. The problem is it will not notify me when I clearly make massive changes to the library folders. My emails come in as “No changes have been made” I made sure that I was not filtering any folders, but I cannot for the life of me seem to get it to work the emails will always say “No changes have been made”. I thought that it may connect to the SQL back-end incorrectly since a plex update or something but clearly it is working for you guys.
It would be great if rather than just one section each for movies, tv, etc. instead there was a section for each of the libraries in my server. I have a separate library for 3D movies that I’ve titled “Movies (3D)” so it would be handy to see movies that have been added there under that heading instead of lumped in with the non-3D movies under the “Movies” section.
@Mark7even said:
My issue is I have configured PlexEmail to run perfectly with no errors and have specified the right folders. The problem is it will not notify me when I clearly make massive changes to the library folders. My emails come in as “No changes have been made” I made sure that I was not filtering any folders, but I cannot for the life of me seem to get it to work the emails will always say “No changes have been made”. I thought that it may connect to the SQL back-end incorrectly since a plex update or something but clearly it is working for you guys.
And is your scheduled task/cron job configured to run at the same interval?
So I got it working, It seems since I have 2 Hard drives in my Mac, the script was pointing to a copy of the Database file and not the actual one but a copy. Navigating around in Terminal I found 3 instances of /var/lib/plexmediaserver/Library/Application Support sections. Not sure how there were 3 but there were and once I pointed the SQL to the right one it worked and the changed content displayed correctly. The 2 Hard drives (1 SSD for OS, 1 HDD for storage and user folders) Really confused the script at least on Mac. Just something to be aware of or it totally could have been user error.
Next short question that I’m sure has already been answered: How do I make it so mobile emails look better and the text not so stretched out without directing them to a webserver to view the email? I swear it was looking perfect for a day and then it somehow loaded the the text smashed.
Not sure what has changed but trying to run the script gives the following error. Last email was successfully sent on 25 Apr 2015 (Emails are normally sent weekly on Mondays).
26th April was a Plex Update, I can see no updates to PlexEmail since 4th Ma 2016
C:\InstalledPrograms\PlexEmail\scripts>python plexEmail.py Traceback (most recent call last): File "plexEmail.py", line 1175, in <module> tvEpisodes = OrderedDict(sorted(tvEpisodes.iteritems(), key=lambda t: t[1][config['episode_sort_2']], reverse=config['episode_sort_2_reverse'])) File "plexEmail.py", line 1175, in <lambda> tvEpisodes = OrderedDict(sorted(tvEpisodes.iteritems(), key=lambda t: t[1][config['episode_sort_2']], reverse=config['episode_sort_2_reverse'])) KeyError: 'season_index'
Line 1175 seems to refer to “episode_sort_2” in the config.conf so here are the relevant lines refering to it in my config.conf