newsletterapp

A demonstration application for the newsletter library.

People subscribe to the newsletter, and then you send them newsletters.

If they get sick of them they can unsubscribe.

Features:

  • sends html email to hundreds of subscribers
  • html editor
  • No database setup. uses sqlite files instead of a database.
  • html templates are customisable. For emails, front end and admin areas.
  • web interface, and command line interface. Admin area password protected.
  • unsubscribes handled.
  • a modern python code base, with tests and documentation.
  • import from csv files.
  • send throttling, so you can reduce the impact on your email server.
  • external or local email server.
  • configuration of many options through a .ini configuration file.
  • dynamic, per user variables like %fullname% in emails.

Limitations:

  • sqlite concurrent access is not as great as a database like postgresql
  • no automatic bounce processing. You’ll have to do this manually.
  • does not attempt to track opens.
  • no through the web configuration of all attributes.
  • ... plenty of other limitations.

Description of files and directories

  • newsletterapp.py is the main script.
  • newsletterapp.ini
  • test_newsletterapp.py is a test for the app.
  • log is where log files are stored.
  • db is the directory where the database files are stored.
  • static is where html templates, css, js are stored.

db

Contains a directory of files.

  • newsletter_sends.sqlitepickle
  • subscribers.sqlitepickle
  • send_parts.sqlitepickle

static

Directory of static files used in the app.

Templates for front end pages, admin pages and email templates.

  • css
  • js
  • web_front_templates
  • email_templates
  • tiny_mce
  • images
  • web_admin_templates

Install newsletterapp

There is a command to create a directory with all of the files in it.

newsletterapp --newinstall=/tmp/newinstall

Run the web application

python newsletterapp.py

Check out the command line options and configuration options.

Using newsletter web admin

  1. users get added to mailing list. Either through admin screen, or signing up themselves from the front of the website.
  2. You create a ‘send’. Which is a subject, and the email body.
  3. You attach subscribers to the send. (you can select everyone, or only add subscribers with different tags... eg trade).
  4. you send the send.

First you’ll want to import emails, or wait until you have subscribers.

Then you will want to compose a new send. Write your email subject, and email body, then save.

Next up, you’ll want to add subscribers to the send. You can do this by going to the list sends section.

Finally you’ll want to send the email out. On the list sends section you can email out a send.

You can import emails with comma separated lines for details.

There is an option to subscribe the emails automatically... which is useful if you are importing them from another system.

Otherwise you can ask the system to send them a subscription email. They will need to click on the confirmation link in the subscription email to do well.

The fields that can be imported are: Email, full name, and tags.

You can enter a subject, and the email to send.

An html editor to edit the html that is to be sent is presented.

Once you create a new send, you will have to add some subscribers to the send.

This lists all of the sends that have been done with this system.

Each send has a status. Either is has just been created, it is in the process of sending, or it has been

You can add subscribers based on tags they have. Or you can add all subscribers. Once you have added subscribers, you can send the emails.

Used to list the subscribers that are subscribed to the newsletter.