{"id":13819159,"url":"https://github.com/bborn/lewsnetter","last_synced_at":"2025-05-16T04:32:47.231Z","repository":{"id":66382452,"uuid":"24540215","full_name":"bborn/lewsnetter","owner":"bborn","description":"E-mail marketing application (create and send e-mail newsletter via SES). Includes subscription management, delivery, bounce and complaint notification, templates, and some stats.","archived":false,"fork":false,"pushed_at":"2016-05-03T17:43:19.000Z","size":4918,"stargazers_count":319,"open_issues_count":1,"forks_count":41,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-14T15:04:40.034Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bborn.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-09-27T19:01:54.000Z","updated_at":"2025-04-05T20:30:27.000Z","dependencies_parsed_at":"2023-10-20T18:19:12.308Z","dependency_job_id":null,"html_url":"https://github.com/bborn/lewsnetter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Flewsnetter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Flewsnetter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Flewsnetter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Flewsnetter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bborn","download_url":"https://codeload.github.com/bborn/lewsnetter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254469727,"owners_count":22076534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T08:00:41.483Z","updated_at":"2025-05-16T04:32:45.190Z","avatar_url":"https://github.com/bborn.png","language":"Ruby","funding_links":[],"categories":["Happy Exploring 🤘","Ruby","Bonus #3 - Self-Hosted Services"],"sub_categories":["Notable Mentions"],"readme":"# LewsNetter\n\nE-mail marketing application. Send e-mails via SES. Subscription management, delivery, bounce, and complaint notifications. Templates.\n\n## Deploy\n\n[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\nYou'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](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html)). For more info on setting up SES in general, see [here](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/setting-up-ses.html).\n\n\n## Getting Started\n\nGo to `/a/signup` and create an account.\n\nUsing the console, turn that account into an admin user (`user.update(is_admin:true, approved: true)`)\n\n### Creating a mailing list\n\nTo 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).\n\nCSV import (and lots of other things) happen asynchronously in [Sidekiq](http://sidekiq.org/). Make sure you have workers running, or use [Hirefire.io](http://hirefire.io) (or some other method) to auto scale your workers.\n\n\n### Templates\n\nWhile 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).\n\nTo make a section of the template editable, give the DOM node the 'editable' class and give it a unique id. For example:\n\n```html\n\u003cdiv class='editable' id='main_content'\u003e\n  This text will be editable\n\u003c/div\u003e\n```\n\nThere are some interpolations you can use within your template:\n\n* `%{currentdayname}`\n* `%{currentday}`\n* `%{currentmonthname}`\n* `%{currentyear}`\n* `%{unsubscribe}` - inserts an unsubscribe link\n* `%{webversion}`  - inserts a link to the web version\n\n### Add a sender address\n\nBefore 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).\n\n### Campaigns\n\n#### Create \u0026 Edit\nYou can create a campaign at `/campaigns/new`. Add a subject line, select a sender address, a mailing list, and a template.\n\nOnce your campaign has been created, you can edit it to add content. The content editing interface uses an [inline rich text editor](https://github.com/daviferreira/medium-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).\n\nThe 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.\n\nAlternatively, 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).\n\n#### Preview\nYou can send a preview of your campaign to yourself (or others) using the panel on the `Campaigns#show` page.\n\n#### Queue\n\nOnce 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`).\n\n#### Send\n\nOnce 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.\n\nYou can monitor Sidekiq at `/admin/sidekiq/jobs`.\n\n#### Stats\n\nOnce 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).\n\n### Subscriber management\n\nTODO\n- Subscription confirmation e-mails are still crap.\n\n\n### Setting up notifications\n\nYou'll want to set up SES to post notifications to SNS Topics, which will in turn post messages to your app.\n\nRead the docs [here](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-sns-notifications.html)\n\nBasically, 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:\n\n* Bounces     --\u003e   http://yourinstall.com/bounces\n* Deliveries  --\u003e   http://yourinstall.com//deliveries\n* complaints  --\u003e   http://yourinstall.com//complaints\n\nTODO - better docs on this\n\n### E-mail \u0026 domain verification and DKIM settings\n\n[http://docs.aws.amazon.com/ses/latest/DeveloperGuide/authentication.html](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/authentication.html)\n\n[http://docs.aws.amazon.com/ses/latest/DeveloperGuide/improve-deliverability.html](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/improve-deliverability.html)\n\n\n## Workers\n\nTODO - something about managing and scaling workers correctly\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborn%2Flewsnetter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbborn%2Flewsnetter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborn%2Flewsnetter/lists"}