PlexEmail - Email Recently Added Media

Side note - I installed Python and the SQLLite DLLs on PLEX01 and there was no change in the behavior.

Ah! OK thank you very much @eadwyn will try it tonight… I´ll let you know ASAP.
Regards
@eadwyn I´ve followed your instructions. I´ve replaced the script file plexEmail.py version 0.8.3 with the yours version 0.8.4 and also replacing the new config.conf file of course filling my data in the file.
I think we have not had any luck :frowning: This is the output:
[/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts] # /opt/QPython2/bin/python2 plexEmail.py Traceback (most recent call last): File "plexEmail.py", line 966, in <module> imageInfo = processImage(hash, imageInfo['thumb'], 'movie', 0, 0) File "plexEmail.py", line 373, in processImage cloudinaryURL = uploadToCloudinary(imgLocation) File "plexEmail.py", line 418, in uploadToCloudinary response = cloudinary.uploader.upload(imgToUpload) File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/cloudinary/uploader.py", line 16, in upload return call_api("upload", params, file = file, **options) File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/cloudinary/uploader.py", line 201, in call_api response = urllib2.urlopen(request, **kw).read() File "/opt/QPython2/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/opt/QPython2/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/opt/QPython2/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/opt/QPython2/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts/cloudinary/poster/streaminghttp.py", line 172, in https_open return self.do_open(StreamingHTTPSConnection, req) File "/opt/QPython2/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Don´t know how to go ahead with this…
Thanks a lot for your help.

I am unable to get this working. Would anyone be able to help me over teamviewer? I would greatly appericate this

@Whataguy56 , most of us here at the forums usually aren’t keen on that specialized/personalized assistance.
Some of the more advanced ninjas and regulars offer support of various Plex things as a paid service.

Post what your operating system is, and what error your getting when you run PlexEmail, and we may be able to assist.

@nickiman - You’ll likely have to replace more than just a single file. Did you overwrite the entire PlexEmail folder with the zip of the new files he created for you, or did you ONLY overwrite plexemail.py and the conf?
If you overwrote the entire install (which you likely should), make sure you adjusted your config to say FALSE for the line
upload_cloudinary_use_https = True

@JamminR OS is Windows 7. The script doesnt even run. I go to open it and cmd pops up quickly then disappears

@Whataguy56 - when troubleshooting, you can’t just double click the py file.
Open a command prompt window, cd to the drive and directory you installed plexemail, then do something like
c:\PMSTools\PlexEmail> python.exe plexemail.py
You may need to specify the python.exe path if when you installed it it didn’t change the path variable
c:\PMSTools\PlexEmail> c:\python27\python.exe plexemail.py

@JamminR said:
@nickiman - You’ll likely have to replace more than just a single file. Did you overwrite the entire PlexEmail folder with the zip of the new files he created for you, or did you ONLY overwrite plexemail.py and the conf?
If you overwrote the entire install (which you likely should), make sure you adjusted your config to say FALSE for the line
upload_cloudinary_use_https = True

My friends @eadwyn @JamminR that was the trick I was only replacing that two files and didn´t saved the string:
upload_cloudinary_use_https = False
in the config file (so it was using https instead).
Now it works!!!:

[/share/CACHEDEV1_DATA/.qpkg/PlexEmail/scripts] # /opt/QPython2/bin/python2 plexEmail.py Web page created successfully Successfully sent 1 email(s)
So now it´s time to configure all the settings to customize it. But at least, the hard part have been solved.
I´m very happy. Thank you very much

I´ll collect all the steps what I´ve followed to be included in this thread (or in your GitHub page if you want) in order to help to the rest of the users which own a QNAP NAS to install / run this software also.

Best regards.

No thoughts in regards to running the script on a box that ISN’T the Plex server or my specific problem?

@JamminR This is the error I get when trying to run plexemail.py imgur.com/D7byrke I posted a link to my error I am getting.

@Team503 said:
No thoughts in regards to running the script on a box that ISN’T the Plex server or my specific problem?

There should be no reason it shouldn’t be doable as long as you can access the Plex Media folder from the remote server. Can you try calling:

sqlite3 /path/to/plex/data/Plug-in\ Support/Databases/com.plexapp.dlna.db

Followed by:

SELECT machine_identifier FROM remote_servers WHERE url LIKE "http://127.0.0.1%";

@whataguy56 said:
@JamminR This is the error I get when trying to run plexemail.py imgur.com/D7byrke I posted a link to my error I am getting.

Make sure you follow the prerequisites. It looks like you didn’t do step 3.

@JamminR I got it working, Just having troubles getting the posters to display in the email. I have filled out the cloud name, api key and api secret. But it still doesn’t show the posters. Any suggestions

C:\Python27>python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win
32
Type “help”, “copyright”, “credits” or “license” for more information.
}}} sqlite3 p:\
File “”, line 1
sqlite3 p:\
^
SyntaxError: invalid syntax
}}} sqlite3 p:\/Plug-in\ Support/Databases/com.plexapp.dlna.db
File “”, line 1
sqlite3 p:\/Plug-in\ Support/Databases/com.plexapp.dlna.db
^
SyntaxError: invalid syntax
}}} sqlite3 p:\Plug-in\ Support\Databases\com.plexapp.dlna.db
File “”, line 1
sqlite3 p:\Plug-in\ Support\Databases\com.plexapp.dlna.db
^
SyntaxError: invalid syntax
}}}

C:\Users\PlexUser\AppData\Local is mapped to the P: drive.

EDIT: Formatting fixed

I can offer TeamViewer access if anyone has the time; I’m probably just missing something obvious.

@Team503 Sorry, assumed you were on Linux so was taking python out of it and seeing if you could directly access the db with sqlite3. With python try this:

python
import os, sys
print os.access("p:\\Plex Media Server\\Plug-in Support\\Databases\\com.plexapp.dlna.db", os.R_OK)

EDIT: I noticed that your path started with Plug-in Support. Is this the case or was it a typo? If it is the case try creating a folder named “Plex Media Server” and putting the current top level into that.

@whataguy56 said:
@JamminR I got it working, Just having troubles getting the posters to display in the email. I have filled out the cloud name, api key and api secret. But it still doesn’t show the posters. Any suggestions

Feel free to share the config file. Make sure to edit out any personal information. Also make sure that the following fields are set this way if you are using Cloudinary:

upload_use_cloudinary = True
upload_cloudinary_cloud_name = '[Your Cloud Name]'
upload_cloudinary_api_key = '[Your API Key]'
upload_cloudinary_api_secret = '[Your API Secret]'

Also, can you share the source of one of the images in your emails? Right click on the image in the email (even if the image is a broken image) and select Copy image address (might be slightly different if not using Chrome).

@eadwyn I have added my config.conf file here. I also have tried to copy the image url from the email but this is what it gave https://a.gfx.ms/i_safe.gif please let me know if I am missing anything :slight_smile: thanks for all your support everyone. i will make sure to give you all likes.

@whataguy56 said:
@eadwyn I have added my config.conf file here. I also have tried to copy the image url from the email but this is what it gave https://a.gfx.ms/i_safe.gif please let me know if I am missing anything :slight_smile: thanks for all your support everyone. i will make sure to give you all likes.

Doesn’t look like the file was attached, it might be the file extension. You can copy it over to a service like http://pastebin.com/ and link it here.

@eadwyn It looks like it fixed it self :slight_smile: thanks for all your help!!

Yay! 100 likes badge.

Glad I could help.

@eadwyn one question… Will you update the github repo with the new script 0.8.4?

I ask you that because I´ve seen that in GitHub you are still using the script 0.8.3 and I´m doing a little tutorial to explain to all QNAP users like me how to get PlexEmail work so I would like to know what should write:

a) Do a git clone command to download the latest script 0.8.4 (if you are going to update the repo in GitHub)
b) Tell them to get the files from your post

Thank you so much!