Email notification
Installation - Email Notification Option
Requirements: Home computer running Python, Wifi Modem or TCPSER
This is a fun feature I put in, but it requires the use of modern technology to get us over the hump. With the power of another computer on your home network and Python3, your BBS will generate emails of BBS events that you can define through the various overlays. I’m using a Kubuntu Linux home computer, where the script listens on a specified port to receive BBS notifications (calls) and then emails me.
Upon BBS startup, you will see at the bottom of the screen “Email Notify: No”. This toggles between “Yes” or “No” by using the up arrow on your keyboard (↑). When set to “Yes”, the BBS will call out to the networked computer after the user logs off. This takes an additional 8-10 seconds of the total time it takes for the system to reset back to the wait-for-caller screen.
NOTE: This should be done with a computer that is within the same network as your Commodore 64. Your ATDT command that must be set to dial your home computer should be an internal network IP; otherwise, your username and password will be sent unencrypted across the internet.
To setup:
- Create your python script on your computer. You will find with this build the file “notify.py”. This one is my script for Kubuntu/linux.
- Next, find out the IP of your computer that will be running the script.
- Edit the script with your desired username and password for the BBS to login as, your SMTP information, and your appropriate “FROM” and “REPLY TO” email addresses.
- Script and the code in √bbs.init are set to port 8502. If you want to change the port, make sure you have modified both (see below for √bbs.init).
- Run the Script
- In your √bbs.init file, edit the following lines to add your IP address to call, username and password:
- 35705 ‘“ATDT your-internal-ip-address-here:8502”:gosub35725:’“your-username”:gosub35725
- 35706 '“your-password”:gosub35725:gosub1110:'da$+" “+t$+”"+cr$+em$+cr$+“end”+cr$:return
The script uses the variable em$ to record events. The BBS records when a user logs on, enters messages or games, and successfully logs off. It also sends out a notification at 6am/pm and 12am/pm stating that it is still alive and well.
You can add events to this by placing em$ in other areas (example: “em$=em$+cr$+”entered area x”), but keep in mind that the variable can only hold a total of 255 characters. It’s also important to note that if you add something to em$, it should be done before invoking the .18 command (save variable state) as the consequent .19 (restore variable state) command will wipe out whatever you had saved; particularly important in the games area. After the user logs off, the BBS will call your computer, transmit username/password, then the events recorded. The last transmission is “end” which tells the script it is finished. The script will then send the information to your SMTP server.
Since the transmission is going from Commodore to a modern-day PC, only lower case should be used as the python script will see this all in capitals (and capitalized characters from the Commodore will be rejected).
Next Section: Preconfigured Builds