Giter Club home page Giter Club logo

lewsnetter's Introduction

LewsNetter

E-mail marketing application. Send e-mails via SES. Subscription management, delivery, bounce, and complaint notifications. Templates.

Deploy

Deploy

You'll need to enter your SES credentials and your SES SMTP credentials in order to send mail (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html). For more info on setting up SES in general, see here.

Getting Started

Go to /a/signup and create an account.

Using the console, turn that account into an admin user (user.update(is_admin:true, approved: true))

Creating a mailing list

To create a mailing list go to /mailing_lists/new. To import users into the list, upload a CSV file with headings for email, name, and created_at ('created_at' is the date when the user subscribed).

CSV import (and lots of other things) happen asynchronously in Sidekiq. Make sure you have workers running, or use Hirefire.io (or some other method) to auto scale your workers.

Templates

While your mailing list is importing, create an e-mail template /templates/new. A template should be a complete HTML document with editable regions. The template will be used as the layout for your e-mail campaigns, and will be run through Premailer (so CSS will be inlined).

To make a section of the template editable, give the DOM node the 'editable' class and give it a unique id. For example:

<div class='editable' id='main_content'>
  This text will be editable
</div>

There are some interpolations you can use within your template:

  • %{currentdayname}
  • %{currentday}
  • %{currentmonthname}
  • %{currentyear}
  • %{unsubscribe} - inserts an unsubscribe link
  • %{webversion} - inserts a link to the web version

Add a sender address

Before you create a campaign, you need to add a sender address (the address from which the e-mails will be sent). To do this, go to the admin section (/admin/sender_address) and add a new address. The app will attempt to verify the address through SES after you create it (you should get a confirmation e-mail from Amazon at that address asking you to click a link to verify it).

Campaigns

Create & Edit

You can create a campaign at /campaigns/new. Add a subject line, select a sender address, a mailing list, and a template.

Once your campaign has been created, you can edit it to add content. The content editing interface uses an inline rich text editor. Occassionally it doesn't load correctly (something to do with Turbolinks). If that happens just refresh the page and it should work (working on fixing this).

The rich text editor will make any regions in your template marked with the class 'editable', um, editable. You can click in them to edit their contents. To add an image, insert the url to the image, highlight it, and then click 'image' in the popup toolbar.

Alternatively, you can use the 'fetch feed items' button in the sidebar to grab a bunch of items from a feed you specify, and then load them into the editor (this is a work in progress, so experiment).

Preview

You can send a preview of your campaign to yourself (or others) using the panel on the Campaigns#show page.

Queue

Once you're happy with your campaign content, you can queue it (the 'queue' button on same page). Queueing is done in Sidekiq, and can take a while depending on the size of your mailing list and the number of workers you have running. By default LewsNetter will spawn one worker per 100 subscribers, but that setting is customizable (just add a Setting in /admin/settings called queue.batch_size).

Send

Once your campaign has queued, you'll see a 'Send' button on the show campaign page. That is the button you will click in order to send the campaign, thus, its name. Sending, like queueing, happens in a background Sidekiq job, and uses the same queue.batch_size setting to allocate workers.

You can monitor Sidekiq at /admin/sidekiq/jobs.

Stats

Once the campaign begins sending you'll start to see stats (again, on the campaign show page, i.e. /campaigns/CAMPAIGN_ID). If you have SNS notifications set up (see below) you'll see deliveries, complaints, bounces, and opens. If not, you'll just see opens (LewsNetter inserts a tracking pixel image into every e-mail).

Subscriber management

TODO

  • Subscription confirmation e-mails are still crap.

Setting up notifications

You'll want to set up SES to post notifications to SNS Topics, which will in turn post messages to your app.

Read the docs here

Basically, you set up SNS Topics to receive notifications from SES and then post messages to your app. Your SNS Topics should post to the appropriate endpoint for each type of notification:

TODO - better docs on this

E-mail & domain verification and DKIM settings

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/authentication.html

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/improve-deliverability.html

Workers

TODO - something about managing and scaling workers correctly

lewsnetter's People

Contributors

bborn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lewsnetter's Issues

Error while deploying to heroku

While deploying to heroku there seems to be an issue, due to "pgbackups", the add-on is deprecated. It's moved to "pg:backups", can you please look through the issue and update it.

Aws signature does not match

Hello,

I deployed to heroku and enter my s3, ses and smtp credentials. But when I try to upload a picture app couldn't upload to s3. Aws gives this error.

\nSignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.......

and this goes on.

What may be the problem here?

Heroku deploy

Hello, I'm trying to deploy on heroku.

I'm not sure to understand the difference between smtp creds / ses creds / s3 creds.

Here is what I've done : create smtp credentials. that give me the smt user and pass and that also created a new User.
I added s3 and ses policy to that same user so I have the same creds for s3 and ses.

Also, how is the db supposed to work ? Heroku creates one ?

Update docs to include approved

After following the README for setup, I needed to approve the user through console too. So a think you should include this on the docs. Change this:
Using the console, turn that account into an admin user (user.is_admin = true)
to this:
"Using the console, turn that account into an admin user:

user.update(is_admin:true, approved: true)"

Fresh start fails

https://github.com/bborn/lewsnetter/blob/master/config/initializers/devise.rb#L13

The Devise initializer pulling from Setting fails because the smailer relation does not yet exist when running rake db:setup or any command used to initialize the database.

PG::UndefinedTable: ERROR: relation "smailer_properties" does not exist
LINE 5: WHERE a.attrelid = '"smailer_properties"'::re...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"smailer_properties"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

/opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `async_exec': PG::UndefinedTable: ERROR: relation "smailer_properties" does not exist
LINE 5: WHERE a.attrelid = '"smailer_properties"'::re...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"smailer_properties"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
(ActiveRecord::StatementInvalid)

Deploy o heroku

I filled out the data from aws ses, and i press button deploy for free and break, and shows me the following error:

There was an issue setting up your app environment.
No such add-on plan.

PD: And enter my credit card.

Thanks,

Sending test campaign as html email is showing up blank

I'm trying out lewsnetter, but I've been having trouble getting preview html emails to work. After creating a template, mailing list, and campaign, I tried 'Send Preview Campaign' but I get blank emails. The plain text email is there though. (I'm using letter_opener to view emails)

I think I've narrowed it down to this line:
https://github.com/bborn/lewsnetter/blob/master/app/models/campaign.rb#L118

self.content_json is always blank, so body_html of Campaign is being read, which is nil.

Any ideas?

Approving a user through the interface fails.

I approved the admin through the console with no trouble. When I try to update the second user through the interface, the log reads:

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "users_pkey"
 DETAIL:  Key (id)=(1) already exists.
UPDATE "users" SET "approved" = $1, "first_name" = $2, "id" = $3, "is_admin" = $4, "last_name" = $5, "updated_at" = $6 WHERE "users"."id" = 2):

Seems it's trying to set its id to 1!

create database

On local enviroment i run rake db:create but:
rake aborted!
LoadError: dlopen(/Users/cristiancvanega/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/curb-0.8.6/curb_core.bundle, 9): Library not loaded: libcurl.4.dylib
Referenced from: /Users/cristiancvanega/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/curb-0.8.6/curb_core.bundle
Reason: Incompatible library version: curb_core.bundle requires version 8.0.0 or later, but libcurl.4.dylib provides version 7.0.0 - /Users/cristiancvanega/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/curb-0.8.6/curb_core.bundle
/Users/cristiancvanega/Software/lewsnetter/config/application.rb:17:in <top (required)>' /Users/cristiancvanega/Software/lewsnetter/Rakefile:4:in<top (required)>'
(See full trace by running task with --trace)

Thansk,

Sorry for my English

install guide

Is possbile to create install guide for clean vps/bare metal?

Sendy

Seems like this is the open source version of Sendy.
Would be great to list the features and compare the status to Sendy.

How to update user

Using the console, turn that account into an admin user (user.update(is_admin:true, approved: true))

How to access this console?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.