Skip to content

About

find new Simple Machine Forum messages and mail them

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

smf-mailer

This is a simple JavaScript Bun program that is intended to be run periodically (cron or systemd timer) to monitor the Recent Posts page(s) of a Simple Machines Forum (SMF) and email all new articles discovered.

NB The main branch has been updated to work with SMF 2.1.x. If using SMF 2.0.x, use the version of this script tagged V2.0.0 with NodeJS.

systemd

This program can be run from a user cron job, but moving to systemd provides centralized logging.

    mkdir -p ~/.config/systemd/user
    cp smf.service smf.timer ~/.config/systemd/user/
    systemctl --user daemon-reload
    systemctl --user enable --now smf.timer
    # check it
    systemctl --user status smf.timer
    journalctl --user -f -u smf.service

History

This was originally written in CoffeeScript but has been Decaffeinated to modern JavaScript. And then later converted to use async/await. It checked the RSS feeds for new messages, but from Version 4 it was rewritten to use the Recent Posts page(s).

The trade-off between the two methods is that Recent Posts gives you the messages in one or two page fetches, but there is no indication of message attachments. The RSS feed method allows complete message and attachment access, but at the expense of more http round-trips and server load (which caused problems with HostPapa hosting).

License

MIT

About

find new Simple Machine Forum messages and mail them

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages