Ability to have users subscribe to email notifications of new posts

Hey all.

So I’ve run a blog for a while on Medium and I’m sick of that site and am looking at options to self-host it. Kirby was one that came suggested in a lot of places and I’m liking what I’ve seen and will be trying it out.

One of the features I want the new blog to have is the ability for user’s to subscribe with their email address to get notifications of when I publish new posts. I know I will need to use a third-party service like MailGun, MailJey, SendGrid etc. to process the outgoing messages and that’s not a problem. However, I’ve looked both in the plug-in gallery and in these forums and I haven’t seen an easy way to set this functionality up.

Is this something that’s possible to do with Kirby for someone who has very little coding experience?

Cheers! :slight_smile:

Definitely!

That’s hard to tell, because I don’t know how little your coding experience really is. Let me answer instead with what you would need to do:

  1. Set up a frontend form for users to subscribe
  2. When the form is submitted and validated, make a remote request to the mail service provider to subscribe the new email address.

For these two first steps, many service providers already provide ready-to-use code you can embed into your templates, so unless you want to do something special, these steps would not require any coding skills.

  1. When you publish a new blog post, you would send a remote request to the mail service provider and trigger sending an email (this can be done in a hook). This part would require a little coding sending a POST request using Kirby’s Remote class. But that’s just a few lines of code sending the data needed to authenticate, and the data you want to send to the mail service provider.

With a little willingness to learn, help from ChatGPT and this community, I’d say it is doable.

1 Like

Very helpful, thanks! My coding knowledge doesn’t go much beyond a bit of PowerShell if I’m honest, but I certainly understand the core idea of what you’re saying here. Once I get my test site setup, I’ll poke and prod and see if I can figure something out and I’ll check here and some other resources if I get stuck on something. Appreciate it. :slight_smile: