[journey] IM product - Simple self-contained opt-in & HTML mailing system

sci0n

Junior Member
Joined
Oct 21, 2021
Messages
144
Reaction score
183
No profit target, doing this purely out of spite.

If I find a solution I doubt it will be difficult to monetize, though. Plus it was my plan to move on to email content once Google implements that AI they got patented and SERP as we know it today will be cancelled, so I'm just going to try anyway.

Objective: A lightweight command line app that will allow a newsletter opt-in (single at first), allowing user tags and 1 email sequence system for onboarding. Open tracking via Google Analytics, if it's still possible. I have a small but very engaged list so I won't worry too much about scaling at first.

Platform: Ruby/Sqlite and a Debian VPS with open ports for SMTP.

So far found two small VPS providers that seem to open port 25 by default (only tested via telnet) so that I don't have to waste time configuring custom things at this stage. I already have a well secured config on one of them so I'm going to work there for now.

First steps:
1. create scaffold of the class and config
2. set up html templating
3. set up signups (single opt in) and a way to unsub
4. set up the onboarding sequence system in the database
5. set up outmails
6. stuff .... like bouncing the emails to clear the list

The signups are most important at this point, I will deploy that once it is tested and just use the collected emails in substack and medium for now (so far they are letting me) but IMO it will be better in the long run to collect the emails on my own without third parties.

Will update this thread on weekends at the very least.

This is more like a mind dump (I need that when building something) but if anyone's interested...
 
How will you get signups for the app?
I have a website that generates a bunch of opt ins every day (mailchimp still lets me collect them even though i'm banned, so that's nice), and a couple thousand followers on platforms that I would ideally need to get emails of before I get banned there too. That's the main thing that needs solving now.
 
Hi all, first update.

It's been a busy week - spent a lot of time on taxes and paperwork, and on getting my linkbuilding target done (a pyramid with some spamming on the lower levels). I'm only short a few referring domains, it's gonna be done by tmr I think.

Also, last weekend somebody told me that the rumour has it there's may be some crackdown on crypto exchanges and that some are delaying withdrawals, so I took all my money out of lending. I really don't want to deal with any more BS than necessary right now.

Mailing system - Backend

I've got the scaffold of it done, just need to test it. I am using the waterfall scheme in ruby and I was able to reuse database connection methods from a different project.

I use the waterfall for most scripts where I need to run things in sequences with some input. You put methods into subclasses if they are specific to certain routine. Then you always call the subclass like Optin.new().run, Optout.new().run. It is easy to chain tasks and let them run in a cron job.

Ruby:
# not actual code, just a schema
class Spammity
    attr_accessor...
    def initialize
        @conf = YAML...
    end
    def db_connection
        # the same for every routine
    end
    def run
        "$#{run}"
    end   
end

class Optin < Spammity
    def run
      self.prepare @conf...
    end
    def prepare
        # specific for Optin routine
    end
end

class Optout < Spammity...

Mailing system - Management & provisional solutions

--- So I decided I'm gonna keep all signups and I'm gonna keep two good lists (different purposes) that I will not spam. I'll use the rest (the junk) to learn and gain experience.

For the learning, I'm at first gonna use servers that are "bad neighborhood" anyway - things that show up on LowEndBox.

--- During the week I got a message back from the support person of one of the mainstream email providers. They told me that I can still open an account, even though my niche is not allowed. I just need to avoid triggering any content alerts they have for breaching ToS. Like you can't mention things like "investment" or so.

So this is great - firstly, I can use them for bouncing the good lists and I don't have to worry about coding that.

And secondly, I immediately went and wrote a child class for a dictionary, obviously.

It's a simple thing that takes in a CSV file, first column the word to search, second the replacement, and applies it on a HTML. It can be industry jargon or for spam any sort of leetspeak. URLs need to be cutt(.)ly though, else they get rewritten too. But for a start it will do.

--- I also coded a thing that reuses some content from the website and posts it on various social networks.

This is the first thing that is already deployed live.

The site in question is from a static site generator that uses YAML for some of its data, so these things are really quick to plug in. I now need to shill that heavily.

Front End & OptIn

One of the monkey patches I thought of after I got booted was getting an RSS-to-email platform so that I can keep sending blog updates. I found one where you get to keep the list of emails who subscribe to your site, so I put that up.

Had to create my own pop up to nag people to subscribe, because before I was using a ready-made one from a mainstream email provider. So I did that in vanilla JS, trying to replicate the previous look except now there is literally just a line of text and a single button that goes to the RSS provider.

And I am actually getting more opt-ins from the new popup. I think the previous one had too many options and people wouldn't bother. This one is simpler and converts better. I'm quite happy about this.

Next week

I want to finish the opt-in process and deploy that. I will not go all-in with it, put it live on one or two landing pages and see how it works.
 
Didn't stop working on it, just got sick and spent all my free time sleeping instead of online forums.

Tech updates for the programmers who follow this

I finished the the opt-in process using the Sinatra gem because that takes literally minutes.
For the optin form template I just searched "free html optin templates" and copied whatever DDG delivered.
IMO the deployment would probably be the bottleneck because you need to configure your server to serve the application.
I'll just copy paste a bunch of code if it will be useful to anyone.

The Sinatra application

This is working code (I'm not gonna share the guts - the class Spammity). Otherwise you can just google how to set up a sinatra app and run this.

What this does is it displays the form template on GET request (if someone just loads the page) but on POST (on clicking the the form's button) it will sanitize the form inputs, record them into a database table 'newsletter-table' and display the thank you template.

Ruby:
require 'sinatra'
require File.join(__dir__, '../lib', 'Spammity.rb')

set :port, 8181
set :static, true
set :public_folder, "public"
set :views, "views"

get '/' do
    erb :optin_form
end
post '/' do
    email = params[:email] || "Nobody"
    timestamp = Time.now.to_i
    Spammity.new(
      {'email' => email, 'timestamp' => timestamp },
       'newsletter-table'
     ).worker
    erb :optin_thanks, :locals => {'email' => email, 'timestamp' => timestamp }
end

To deploy this, you need to configure a server location to serve the port of your Sinatra app (here 8181) and if it's not the same domain name, you need to add server headers to allow that endpoint be displayed inside an iframe on your target web site. This is for nginx

NGINX:
location / {
    proxy_pass       http://localhost:8181;
    proxy_set_header Host      $host;
    proxy_set_header X-Real-IP $remote_addr;
}

add_header Content-Security-Policy "frame-ancestors https://my-target-website.com";
add_header Content-Security-Policy "frame-src https://my-target-website.com";

(I could almost do this for a living if i wasn't from a low wage country, hah)

Then you just need to start the Sinatra application via a program called "screen" that will keep it running. Here is a digitalocean tutorial:
Code:
https://www.digitalocean.com/community/questions/how-can-i-deploy-a-sinatra-app
 
Back
Top