PlexEmail - Email Recently Added Media

I got everything setup and I got the email to successfully send an email to me as a test and copy the images to my webserver directory and create the index file however I’m having an issue.

In the email no images load, if I copy the link of the picture and paste it into my browser it sends me to Plex, I login and it says the server your trying to access does not exist.

If I go to the webpage via localhost or via the domain from an external network the webpage loads as well as the images, But if I click the link it takes me to Plex, I sign in and get the same error as above. Images do not load in gmail or OS X mail. Opening the email on Outlook for iOS crashes the app. Also, clicking the view in web browser link does nothing.

I tried searching through this thread but cannot find anything similar to this.

Here are the relevant (what I feel is relevant anyways) lines from my config file

upload_use_cloudinary = False

web_enabled = True
web_only_save_images = False
web_domain = ‘plexemail.redacted.com
web_path = ‘plexemail’
web_delete_previous_images = True
web_skip_if_no_additions = False

email_use_web_images = True

filter_include_plex_web_link = True

filter_show_email_images = True

edit: I think I discovered the problem, if I copy the non working image link from the email I get

http://plexemail.redacted.com/plexemail/images/54241609ce9e7e0280570c2e09ba7af42e3d1349_e64ebf6505bb40dd4fc47fc8493f4239f16af9d7.jpg

and if I copy the working one from the webpage I get

http://plexemail.redacted.com/images/54241609ce9e7e0280570c2e09ba7af42e3d1349_e64ebf6505bb40dd4fc47fc8493f4239f16af9d7.jpg

So the email is adding an extra /plexemail/ into the location

web_folder = ‘E:\’

There are two slashes there when I submit it’s removing one of them.

E:\ goes to \wwwroot\ on my IIS server. The site is in wwwroot\plexemail

IIS redirects to \plexemail based on the incoming requests to the subdomain

plexemail.redacted.com

redacted.com goes to the default site in IIS.

EDIT:

I had to create a virtual directory in my default site to /plexemail instead of the binding for the subdomain. and set my domain in the config to http://redacted/

My plex web links are still going to the wrong server ID. I dug through the python and found it pulls the server ID from the dlna db file, I setup Plex Home which I believe disables the DLNA feature and have since migrated my plex server to a couple of different machines. I believe that file still had the old server ID since it no longer uses DLNA. I opened the DB in and modified to the server ID that now shows up in my plex web links and now the Plex web links work as well. At least to my account, have not had someone test the link that access via a share.

@g4m3r7ag -
web_domain = ‘plexemail.redacted.com
web_path = ‘plexemail’
I’m pretty sure PlexEmail uses web_path in conjunction with domain to create the links, so it’s expecting plexemail.redacted.com/plexemail as the link to work.
As correcting, I’d only guess leaving it blank as ‘’ might work, but then that might break something else.
Perhaps change web_folder to E:\plexemail if it does break leaving path blank?

Your reply went to the next page I didn’t see it until just now. I edited my original post, that was exactly the issue.

I’m now not liking the idea of an accessible web page for prying eyes to see what I’m adding to my library, don’t want to provide evidence. Trying to figure out a way to secure the web page but have the emails still link to the images.

@g4m3r7ag said:
Your reply went to the next page I didn’t see it until just now. I edited my original post, that was exactly the issue.

I’m now not liking the idea of an accessible web page for prying eyes to see what I’m adding to my library, don’t want to provide evidence. Trying to figure out a way to secure the web page but have the emails still link to the images.

Why not use cloudinary?

foebik, though I can’t speak for g4m3r7ag, if I had my own web server and bandwidth to spare, I too wouldn’t use 3rd party.
I really hate storing personal stuff on 3rd party ‘free’.
I know they’re making money off me somehow.
Another thing I don’t like about 3rd party…sometimes they just up and disappear/get bought out and closed, with no easy alternative web place to go.

That was my thoughts exactly Jammin

@JamminR said:
foebik, though I can’t speak for g4m3r7ag, if I had my own web server and bandwidth to spare, I too wouldn’t use 3rd party.
I really hate storing personal stuff on 3rd party ‘free’.
I know they’re making money off me somehow.
Another thing I don’t like about 3rd party…sometimes they just up and disappear/get bought out and closed, with no easy alternative web place to go.

All valid points. I’m just not as concerned about it :slight_smile:

got another feature request. is there a way to know if it is the first time sending the email to someone? if so, you could have a welcome section, maybe if you want to tell them about the features you are offering, any rules you may want them to follow, etc. a sign up page would be cool too.

Prob a very nube question but I would love some help. I have gotten it sending emails and creating the web page but every time i just get the page that says “There have been no new additions to Plex”. No matter how far back I go it doesn’t seem to add content for whatever reason. I am not getting any errors thrown though. Is there something in the config that explicitly adds the libraries in my plex environment or should it auto grab from movies and shows by default. I’m banging my head in frustration at this point.

WIndows 7
Apache

@amoodyic87 - don’t hate me, but have to ask - are new movies/tv shows being added during the time frame you have configured? Other than that simple answer, one of us would likely have to review your config file. Lots of places in it to go wrong. If you want, I volunteer. Just make sure to first) remove all your account info (email password/cloudinary keys if using it/Plex account) and second) PM attach it to me instead of posting it in case something private gets inadvertently left in.

Yea,
I have added a ton of content during the timeframe but yea very safe question to ask I will PM you the config file in a sec. I really appreciate it.

In review of @amoodyic87 's config file, we believe that they’d pointed the ‘plex_data_folder’ to the incorrect location. For anyone else reviewing this thread, if you’ve used a custom path for where “local application data” is stored in Plex Settings, make sure to point plexemail to the root “Plex Media Server” directory that the custom path created.
Just an example.
I pointed my ‘custom’ local app data path to D:\PlexCache
Upon restart of the server, Plex created d:\PlexCache\Plex Media Server\ … , where … is Logs, MetaData, Plug-ins, Plug-in Support, and a few others.
I pointed PlexEmail “plex_data_folder” to D:\PlexCache\Plex Media Server\
I hope that helps anyone in the future.
I’ve still not heard back from @amoodyic87 to see if they are having further issues.

v0.7.0 Released

Features

  • Can choose between episode, season and show art work for the TV
    episodes section.
  • Can filter (include/exclude) based on the title of the item in all
    libraries. Useful if you want to only send emails to a specific user
    when a specific show is added.
  • Added the ability to show the air date for movies, TV shows and TV
    episodes.

Bug Fixes

  • Fixed an issue with the MIME type when attaching images directly to
    the email.

Download here: https://github.com/jakewaldron/PlexEmail/releases/latest

So I’m running this on Server 2012 R2. When I disable the PlexAPI function and specify an email address, everything works fine. When I set it to “TRUE” this is the error I get:

‘C:\Python27>python scripts\PlexEmail.py
Web page was not created because the option is disabled in the config file.
Traceback (most recent call last):
File “scripts\PlexEmail.py”, line 1051, in
sharedEmails = getSharedUserEmails()
File “scripts\PlexEmail.py”, line 199, in getSharedUserEmails
parsed = XML(response.text)
File “C:\Python27\lib\xml\etree\ElementTree.py”, line 1300, in XML
parser.feed(text)
File “C:\Python27\lib\xml\etree\ElementTree.py”, line 1640, in feed
self._parser.Parse(data, 0)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u2019’ in position 3
870: ordinal not in range(128)’

I’m not sure where the error is - I reset my password on Plex, and I tried both my email and my username. Can anyone help? I can provide Teamviewer access if need be.

@Team503 - somewhere in your configs, you likely have a single left quote ` where python (and PlexEmail) is expecting right quotes to start/close variable settings.
Or worse, someone in your user list has that in their email.
The PlexEmail Dev @eadwyn would need to find a way to fix/sanitize that.

Sadly, no. The single quotes I added manually to use Markdown in the post - supposed to be similar to the UBB




tags.

Here’s the screen shot.

@Team503 - anyone in your Plex friends list have a left single quote in thier username or email address?
That error leads me to believe the python is choking on the XML that is returned from the get mail list.
\u2019 is python’s ascii format for single left quote.

Not that I can see on usernames. A coupe have periods, one has a hypen. That’s it.

I added a fake friend with a single quote in the username and was not able to reproduce this. If you don’t mind sending me the response with your shared usernames and emails in a PM that could help me reproduce the issue and fix it; otherwise I’m shooting in the dark to try to fix it.

If you don’t mind, could you add the following line directly before the line it is breaking on at line 199? Then send me the output in a PM.

print response.text