PlexEmail - Email Recently Added Media

##Email
email_enabled = True
email_individually = False
# ['email1@gmail.com', 'email2@hotmail.com']
email_to = ['admin@mydomain.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_from = 'myemail@domain.com'
email_from_name = 'Me'
email_smtp_address = 'smtp.altibox.no'
email_smtp_port = 25
email_use_ssl = False #Port must be an SSL port i.e. 465
email_username = ''
email_password = ''
# Only valid if web_enabled = True and upload_use_cloudinary = False
email_use_web_images = True
email_skip_if_no_additions = False
 
 
This is my ISP provider, ive used them for other stuff via wordpress newsletters etc etc, It dosent require auth at all (its allowed to relay cause of my IP)

I'll have to add a new config option whether or not authentication should be used.  I'll try to get you something later when I get home from work.

@DereckR and @saitoh183,

I like what you guys are doing here. I have a question for you. Are these changes being made in the CSS file or in the HTML or python script. Reason I ask is because I host my web page on Google Drive, but it wont pick up the CSS, and I cant figure out where to change it so that it can read the CSS (also on Drive). I'm assuming it is because the CSS now has a web address rather than a local address.

I would love to be able to get my web page looking as well as the email in it's default settings, but if even that can be reformatted also, that's even better.

Semperfratres,

I have not done anything with the actual webpage portion of this for right now. With the email's I am not using a CSS file and you are limited with the styling in email's.

I have edited portions of this inside the Python and inside the config. I am simply making connections in the config file to point to locations in the python for easier editing. All of the formatting and layout i am doing inside the python script and just adding my variables in.

You can do similar things for the webpage by finding the section that is web.

I have not worked on the webpage because didn't quite understand the instructions for it and I am using XAMPP.

Please see the section below in the Python for editing the webpage.

def createWebHTML():
  htmlText = """
      
  <head>

      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="description" content="">
      <meta name="author" content="">

      <title>""" + config['msg_web_title'] + """</title>

      <!-- Bootstrap Core CSS -->
      <link href="css/bootstrap.min.css" rel="stylesheet">

      <!-- Custom CSS -->
      <link href="css/one-page-wonder.css" rel="stylesheet">
      
      <link rel="shortcut icon" href="images/favicon.ico">
      <link rel="apple-touch-icon" href="images/icon_iphone.png">
      <link rel="apple-touch-icon" sizes="72x72" href="images/icon_ipad.png">
      <link rel="apple-touch-icon" sizes="114x114" href="images/icon_iphone@2x.png">
      <link rel="apple-touch-icon" sizes="144x144" href="images/icon_ipad@2x.png">

      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->

  </head>

  <body>

      <!-- Navigation -->
      <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
          <div class="container">
              <!-- Brand and toggle get grouped for better mobile display -->
              <div class="navbar-header">
                  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                      <span class="sr-only">Toggle navigation</span>
                      <span class="icon-bar"></span>
                      <span class="icon-bar"></span>
                      <span class="icon-bar"></span>
                  </button>
                  <a class="navbar-brand" href="#">""" + config['msg_top_link'] + """</a>
              </div>
              <!-- Collect the nav links, forms, and other content for toggling -->
              <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                  <ul class="nav navbar-nav">"""

if (movieCount > 0 and config[‘filter_show_movies’]):
htmlText += “”"


  • “”" + config[‘msg_movies_link’] + “”"
  • “”"
    if (showCount > 0 and config[‘filter_show_shows’]):
    htmlText += “”"

  • “”" + config[‘msg_shows_link’] + “”"
  • “”"
    if (seasonCount > 0 and config[‘filter_show_seasons’]):
    htmlText += “”"

  • “”" + config[‘msg_seasons_link’] + “”"
  • “”"
    if (episodeCount > 0 and config[‘filter_show_episodes’]):
    htmlText += “”"

  • “”" + config[‘msg_episodes_link’] + “”"
  • “”"
    htmlText += “”"





          <!-- Full Width Image Header -->
          <header class="header-image">
              <div class="headline">
                  <div class="container">
                      <h1>""" + config['msg_header1'] + """</h1>
                      <h2>""" + config['msg_header2'] + """</h2>
                  </div>
              </div>
          </header>
    
          <!-- Page Content -->
          <div class="container">"""
    

    htmlText += htmlNotice
    if (movieCount > 0 and config[‘filter_show_movies’]):
    htmlText += htmlMovies + ’
     ’
    if (showCount > 0 and config[‘filter_show_shows’]):
    htmlText += htmlTVShows + ’
     ’
    if (seasonCount > 0 and config[‘filter_show_seasons’]):
    htmlText += htmlTVSeasons + ’
     ’
    if (episodeCount > 0 and config[‘filter_show_episodes’]):
    htmlText += htmlTVEpisodes

    if(not hasNewContent):
    htmlText += “”"


    “”" + config[‘msg_no_new_content’] + “”"


    “”"

    htmlText += “”"







    “”" + config[‘msg_footer’] + “”"




      </div>
      <!-- /.container -->
    
      <!-- jQuery -->
      <script src="js/jquery.js"></script>
    
      <!-- Bootstrap Core JavaScript -->
      <script src="js/bootstrap.min.js"></script>
    
    </body>
    
    </html>"""
    

    return htmlText

    Thanks,

    Dereck

    Thanks Dereck. I'll look into this. If I can get away from the CSS for the web page, it will make things easier for me.

    The reason I went to Drive to host my page is because I couldn't get XAMPP to work correctly for me.

    Not to mention having an open port for the server on my PC wasn't really appealing to me either.

    Thanks again for the info,

    Tim

    Hi all, please any help or tutorial for dummies how I can install this Plugin in a QNAP NAS?.

    Regards

    Paco

    I'll have to add a new config option whether or not authentication should be used.  I'll try to get you something later when I get home from work.

    Thanks, looking forward to the fix:)

    How can we use a webserver instead of cloudinary? I know it is easier with cloudinary but i fear the free account wont last long with the speed my library is growing. I would like to set up the webserver but not really sure how to proceed. I already have Mysql installed so i could use it to store a DB but im at a lost on how to go about it.

    So here is my final email template :)

    keZUC.jpg

    So here is my final email template :)

    keZUC.jpg

    So what client is that template being shown from? I notice some inconsistencies with the original template when you view it from mail.google vs Outlook.

    I like the options for background color for the rest of the body of the email, that is very nice. The overall format feels very good. I like to start playing with it tomorrow if you post your changes ;)

    Have you tested to see what it looks like on mobile yet?

    Thanks for the hard work.

    So what client is that template being shown from? I notice some inconsistencies with the original template when you view it from mail.google vs Outlook.

    I like the options for background color for the rest of the body of the email, that is very nice. The overall format feels very good. I like to start playing with it tomorrow if you post your changes ;)

    Have you tested to see what it looks like on mobile yet?

    Thanks for the hard work.

    It is not optimized for mobile...but i im not a pro so i will need to do research on how to do that. Also it was created to look nice on gmail. On outlook.com there are issues with the dates placement. I hate email templates  sometimes..lol

    It is not optimized for mobile...but i im not a pro so i will need to do research on how to do that. Also it was created to look nice on gmail. On outlook.com there are issues with the dates placement. I hate email templates  sometimes..lol

    Honestly, I'm fine with all of that. I'm not particular enamored by the original template look on mobile anyway. I doubt for my group of users that they use it on mobile or Outlook much. But you never know. 

    I will look into fixing the outlook.com visual since I do have a few users with Hotmail accounts. I will post my code when I clean it up


    Sent from my SM-G920W8 using Tapatalk

    I have added a lot more than this just haven’t posted code. I have added color options for movies section and working on separate configuration you can edit will be email template. I have made the template where you can change all the text on saitohs and recreating this in photoshop from some HD graphics looks amazing.


    Coming soon.

    I have added a lot more than this just haven't posted code. I have added color options for movies section and working on separate configuration you can edit will be email template. I have made the template where you can change all the text on saitohs and recreating this in photoshop from some HD graphics looks amazing.

    Coming soon.

    So any idea how to set this up as a website? And use Web images?

    Sent from my SM-G920W8 using Tapatalk

    So any idea how to set this up as a website? And use Web images?

    Sent from my SM-G920W8 using Tapatalk

    You'll need to set up a webserver on your machine with something like tomcat, WAMP or XAMPP.  The latter two are more user-friendly but include a bunch of stuff that you don't necessarily need.

    You'll need to set up a webserver on your machine with something like tomcat, WAMP or XAMPP. The latter two are more user-friendly but include a bunch of stuff that you don't necessarily need.

    Yeah I have xampp for plexwatch Web I just need to know what I do next. Do I just copy the plex mail folder to xampp\ht docs?

    Sent from my SM-G920W8 using Tapatalk

    Yeah I have xampp for plexwatch Web I just need to know what I do next. Do I just copy the plex mail folder to xampp\ht docs?

    Sent from my SM-G920W8 using Tapatalk

    Copy the web folder contents to your web directory (might want to make a subfolder of plexemail or something similar).  Then modify the config file:

    web_folder = 'C:\\wamp\\www\\' (change to the location of your web folder)
     
    web_enabled = True
    web_only_save_images = False
    web_path = 'plexemail' (if you put the files into a subfolder named plexemail, this would be what you would put here)
    web_delete_previous_images = False
    web_skip_if_no_additions = False
     
    Then navigating to http://www,somedomain/plexemailshould show the webpage after running the script.

    Saitoh,

    The port that your plex watch web made you change it from port 80 to port 32480. I just changed my back to 80. You can use that port but you are going to have to add it like so http://localhost:32480/PlexEmail/

    Config.conf settings below:

    web_folder = 'C:\\xampp\\htdocs\\'
    
    ##Web
    web_enabled = True
    #This will not create the index.html file, but will still save the images to the images folder.  (Useful for when you only want to send an email)
    web_only_save_images = False
    web_domain = 'localhost'
    web_path = 'PlexEmail'
    web_delete_previous_images = False
    web_skip_if_no_additions = False
    

    Once you have done this it will work if your port is 80 you would go to http://localhost/PlexEmail/ and would see the webpage generated. If you are using the PlexWebWatch port which It has you do 32480 you would do http://localhost:32480/PlexEmail/

    The webdomain would be your outside ip Address and would port forward to your Plex Server. But for testing if you put in localhost it will be your local computer.

    XAMP Change Default Port

    http://www.complete-concrete-concise.com/web-tools/how-to-change-the-apache-port-in-xampp

    Copy the web folder contents to your web directory (might want to make a subfolder of plexemail or something similar).  Then modify the config file:

    web_folder = 'C:\\wamp\\www\\' (change to the location of your web folder)
     
    web_enabled = True
    web_only_save_images = False
    web_path = 'plexemail' (if you put the files into a subfolder named plexemail, this would be what you would put here)
    web_delete_previous_images = False
    web_skip_if_no_additions = False
     
    Then navigating to http://www,somedomain/plexemailshould show the webpage after running the script.

    Thanks i got it up and running. Is the website customization in the plexemail.py as well?

    I'll have to add a new config option whether or not authentication should be used.  I'll try to get you something later when I get home from work.

    Did you manage to get a look at this?