Anetoptin Linux Email Newsletter Double Opt-in PHP Sqlite3 Script

Anetoptin Linux Email Newsletter Double Opt-in PHP Sqlite3 Script

Are you looking for a basic email newsletter with double opt-in PHP Hypertext Processor script using structured query language lite version 3 for Linux? You can try out Anetoptin, which was written in Hypertext Processor language. You see I needed a way to allow website visitors to sign up, receive newsletter email messages, and remove their subscription.

I could not find any double opt-in Hypertext Processor scripts that used a structured query language lite version 3 database. I prefer using structured query language lite over most modern bloated databases. I decided to create a very basic and simplistic email newsletter double opt-in script using structured query language lite version 3 on a Linux operating system web server.

Also, I needed a double opt-in email newsletter hyper text markup language sign up form and either a standalone desktop application and or web based administrator panel. I choose to create a simple administrator panel to send out email messages to an entire list stored in a local database. Finally, some javascript was necessary to output display messages.

You can download this open source Linux email newsletter with double opt-in feature that was written in Hypertext Processor below.


Download Anetoptin Version 1.0

This Linux open source double opt-in script, sign up form, and administrator panel includes following features:

  • Lightweight
  • Double Opt-in
  • PHP Script
  • HTML Sign up Form
  • Secure Administrator Panel
  • SQLite3 Database Support
  • One Click Subscription Removal
  • Broadcast Newsletter Web Based
  • Avoid Messages Marked Spam Rate Limiting
  • Receive Email Sign up Notifications
  • Activation Links Expiration Security
  • One Click Subscription Activation
  • One Single PHP Script

This PHP Hypertext Processor script, including hyper text markup language email opt-in form and administrator panel, supports any Linux operating distribution that includes PHP 8.3, Sqlite3 versions, and compatible web server. You can further increase security by installing and using PHP mailer library. This software is available for download in a compressed zip file.

These following files are included in download:

  • credentials.ini
  • index.html
  • LICENSE
  • README.txt
  • subscribe.js
  • subscribe.php


How to Install Anetoptin

You will want to decompress that downloaded zip file. Then upload index.html, subscribe.js, and subscribe.php to a public root web server folder, for example /home/user/www/public_html/newsletter/. You will then want to upload credentials.ini to a private folder outside of your webroot web server folder, for example /home/user/private/.

An included README.txt file has full instructions. You will require PHP 8.3 and SQLite3 versions installed in your web server in order for this PHP script to function. Also, for administrator panel security a secret hash must be created.

Log into your web server account in a terminal session. Include your intended clear text password and create a secret password hash with this command:

php -r "echo password_hash('enteryourpassword', PASSWORD_BCRYPT) . PHP_EOL;"

Edit that credentials.ini file and change a username to your server user account that has read and write permissions.

Change that example password_hash to a password hash you just created. Now when you enter in your intended clear text password, it will become encrypted. Modify these lines of code below in that subscribe.php file.

You only need to change, in each line of code where ENTER begins the text that requires modification.

$admin_email = 'ENTERYOUREMAILADDRESS'; // Second email address to receive notifications

header("Location: ENTERPATH/index.html?msg=". urlencode($message) . "#subscription-message");

$config_path = 'ENTERABSOLUTEPATH/private/credentials.ini';

header("Location: ENTERPATH/index.html?msg=". urlencode($message) . "#subscription-message");

header("Location: ENTERPATH/index.html?msg=". urlencode($message) . "#subscription-message");

$config_path = 'ENTERABSOLUTEPATH/private/credentials.ini';

Here are example code changes below. You will want to modify those lines of code to match your web server environment. These are from a working production environment with Internet domain changed.

$admin_email = 'help@domain.com'; // Second email address to receive notifications

header("Location: ../shop/index.html?msg=". urlencode($message) . "#subscription-message");

$config_path = '/home/user/web/domain.com/private/credentials.ini';

header("Location: ../shop/index.html?msg=". urlencode($message) . "#subscription-message");

header("Location: ../shop/index.html?msg=". urlencode($message) . "#subscription-message");

$config_path = '/home/user/web/domain.com/private/credentials.ini';

You can now access an index.html web page, with an example opt-in email sign up form, by browsing to a folder where it is located. Accessing an administrator panel is as easy as browsing to subscribe.php. You will be prompted to enter in your login credentials.

Finally, you can then send an email broadcast to your entire subscribers list. NOTE: With a built in rate limiting feature, broadcasting your newsletter is intentionally slower than a normal send task. This feature is designed to protect your email messages from being blocked or flagged as spam due to some Internet email administrators scanning for spammers.

This Anetoptin PHP script uses Hypertext Processor default mail() function. For extra security, you would need to install PHP mailer library. Then configure this script to use that libraries mailer function. When correctly installed, you can test this email newsletter double opt-in web application.


Need Help Installing This Script? You Can Schedule a Private Consultation and Start Receiving Email Subscribers!


Frequently Asked Questions

How do I test email subscription html form?
Open index.html file in a web browser. Enter in a real email address you have access to. Click on activation web page link in email sign up message you receive.

How do I test subscription removal?
Send a test newsletter broadcast in administrator panel. Click on unsubscribe web page link in newsletter message you receive.

How do I access and use administrator panel?
Open subscribe.php in a web browser. Enter in your required login credentials. Administrator panel has a newsletter send form.

You can broadcast a newsletter to all your subscribers.

Can I use the included email opt-in html form for production use?
Certainly, you can copy html including css styling and form into an existing web page. This form is being used in production on this very same website. You can modify css styling and form attributes, colors, text, etcetera to fit your website theme.

Do I need to modify any part of javascript?
No, in order for messages to display on included index.html file, no modifcation is necessary.

Do I need to modify any other parts of an included subscribe.php besides what is listed above?
No, you do not need to make any other modifications. Making further modifications could cause script to not function as intended. However, feel free to modify subscribe.php if necessary, for example extra security with PHP mailer library.

Do I need to modify included index.html?
No, making any modifications could cause email double opt-in form not to work as intended. That included form is primary for testing purpses. However, it can be modified for production purposes.

Why does your subscribe.php double opt-in email script not include a subscribers.db SQLite3 database file?
When you perform your first successful text subscription, a subscribers.db file is automatically created in local folder where other necessary files are located.

What type of license is this application software released with?
Anetoptin is released using the Massachussetts Institute of Technology open source license.