Sympa newsletters with Wagtail
Transcript
By Speaker 1, Speaker 2. From Wagtail Space 2025. Published November 19, 2025.
Watch the video Markdown version 2,463 words · auto-generated · en
Summary
Agnes Hassar built a Wagtail newsletter workflow for Délibéré, a journal whose content is organized into themed issues, so editors could compose issue announcements on the site and send them through Sympa. She used the Wagtail newsletter package to create a dedicated newsletter page type, then wrote a custom backend because Sympa sends messages directly to mailing lists and does not use the audience and campaign model expected by the package’s Mailchimp backend. The implementation generated an HTML email and a plain-text alternative; she said it was working but still needed improvements, including translations and better Outlook support. Sympa handles mailing lists and bounces, while open tracking requires separate tracking in the email and may be incomplete.
Transcript
Automatically transcribed, so expect mistakes in names and technical terms. Filler words are removed.
0:00 Introduction
Speaker 1
Hello everyone. Welcome to our next session. Today I'm very pleased to introduce Anyes Hassar. Who is going to be talking about Simpa newsletters with Wagtail? Okay, take it away.
Speaker 2
Hello everyone. Hello, space people. So Not yet. Hello everyone. Should I speak now?
Speaker 1
Yeah, go ahead and get started.
Speaker 2
Okay, thank you. Hello everyone, so as Vince told you I'm going to talk to you about newsletters and wagtail. with a tool named simpa or simp simpa when you speak franglish like me So I'm my name is Agnes. I'm working in a small agency named HashBank. which is in Lyon, France. This is our lab wagtail website on which we're doing
experimentations before proposing them to our customers and I wanted to show you that in Lyon we are in street In Django Street. But that's not the topic of the talk. Today I'm going to talk about newsletters So first I will show you the context in which I had to add newsletters in Wagtail. And then I will tell you the story of how I did it using the Wagtail newsletter package
2:21 The Delibéré Use Case
Speaker 2
that was published earlier this year. So let's go with the context, which is délibere So this is another Wagtail website. We did not build it, we are maintaining it and making it evolve. So Delibérer is a journal of reflection on justice, law, rights, freedoms It's written and edited by French magistrates, judges,
And I would wanted to show you the website because the content is structured around the issues in French un numéro. So in Franglish during this talk, sometimes I will say a number. And it's an issue in fact. So each issue has its own subject Like here it's about disabilities and justice and how does justice work for people with disabilities? And
every issue has its own color. So it gives the whole thing consistency but every number has its own every issue I told you I speak for English Every issue has its own identity in the whole graphic consistency. So in fact I really like how it goes out. And this is the website for which
the client asked me, they told us, to they wanted to send newsletters directly from their websites And I will explain it to you why. So delibere and the work type website. They are the whole content is structured around issue. So I have my main content class in Wagtail is a numéro for issue. And this client, like
5:29 Sympa and the Newsletter Package
Speaker 2
many French people, maybe like many people around the world, they are using SIMPA or SIMPA. It's an acronym for System de Multipostage Automatique because It has been written by French people and French people love acronyms. So it's just a mailing list management software which is licensed under GPL so it's free software and it just works. It's quite common in French universities
and in French internet. So I have seen quite a lot of simpas server since I'm working in the industry So just it's just like a Google group, but without Google. So it does work. You just send a list to an email to a given list. and Simpa does the broadcasting according to a lot of configuration options So Simpa is very powerful, but not for making beautiful emails.
Simpa is just the server that sends emails. It doesn't help you make beautiful emails. So because of the dark magic of email layout, our client asked Faraway to write the newsletter directly from Wagtail. And at that time I stumbled upon this blog article about the wactile newsletter package and it was like a cosmic connection
so thank you Alex who's not here because he's giving a talk just like I'm talking to you. So I read this blog post with much attention and I decided that this was the way I would do it. So just going a little bit faster So how did I do this thing? In this package You have to use a Wacta newsletter package you have to do two things.
8:36 Newsletter Content Modeling
Speaker 2
First you have to decide which content of your website you will be using as a newsletter And you have to use or create a backend to actually send the newsletter to the vendor. And I had to do the two things because the out of the box backend wasn't what I wanted to use. So first the newsletter mix-in, which is the content of your website you will be using as a newsletter content.
So in theory you could extend any page model and Tell the website this page is your newsletter. I decided not to reuse an existing page of my website but to create a new one. Which led me to numero newsletter that is issue newsletter Because they send newsletters almost only to announce that a new issue has been published. So
I created a new class and I will show it to you right now in my IDE so email newsletter here it is so you extend the mixin newsletter page mixin And I added some info. So here you have the body which will be the main content of the email I have an image and a kind of title at the beginning and that's
that's it you have a method which is get newsletter context and it was different from getContext. In that case, since I made a dedicated page for newsletter See the get context just reuses the newsletter context, but it could be useful. s depending on new use case to have two very different methods for that. And what do I do in my context? I add the color of the number.
Of the issue franglish sorry this is it this was the most interesting part of the method And here I had to cheat a little bit, but it's a spoiler for the next part, so let's talk about it later. So what does it look like in admin? So I kind of Don't see my tab. Here it is.
12:30 Admin Preview and Testing
Speaker 2
So this is the admin of my Adam Dev environment because I will not be sending actual newsletter right now So you're supposed to choose an issue and to add a subpage in it And I don't see the button because of zoom artifacts. So here I add a sub page, I add a newsletter. And I can type something
No image In the email I have quite simple content title content And images. So the documentation which is provided is really complete so it was really nice to work with that documentation and with the module it was
it was easy to use and when i save I did not anticipate that thing. What is cool is that you can preview your newsletter. This number is pink, so the newsletter is pink too. You can preview in web. So it works. And now I want to send my campaign. I'll just send the test email.
14:58 Building the Sympa Backend
Speaker 2
Do I have I don't? I don't have it. I have a test email client but it doesn't work right now so let's go to the next so believe me it works yeah Then adding a backend. So the backend is the part of the code that does the actual sending. of the newsletter being actually sending an email in my case
or making API calls to MailChimp or whatever vendor you are using. And I'm going to go back to dive in the code again. So you have to add some classes. First I thought I would just need to add a backend on a recipient. And in fact I had to add a campaign to as a simple Django model. So I began with the back end. Simple backend And I had no idea what to do with it, so I just
clicked and went to read the source of the module. and I didn't get it so I went to read the existing Mailchimp backend So I understood that the MailChimp backend is a wrapper around the API client. So you can for example Deal with audiences. You have the notion of campaign which is not saved in Wagtail but in MailChimp. And then the idea of campaign isn't the same at all in Sympa
because in Simpa you don't have campaigns. you just send an email to a given list. So my backend was way simpler So I had to cheat a little bit to hide buttons that were not useful for Simpa. or to just send the email. So now I can go back to my backend So the expected method save campaign is just a save
in Django way. You can send a campaign and send a test email which is the same thing like send an email I had to twist something. Yeah, I just had the HTML version of the message But to send an email with Django, you need a text version of your message. And at that point, I had no access to the page object so I made something
a little bit ugly but it worked so I will show you And here is the part of the code I like to write. See? I don't know what an audience is. But I know I don't need it in Simpa. So I just return an empty list or I just do absolutely nothing. And that's okay. It worked. Now I will show you this get text alternative I'm really proud of it and it works. I've written it like yesterday evening. Yes, that night.
So at the beginning I just made strip tags to get the text message from the HTML but I had a whole text without space. So I just replaced ending tags with new lines and some decoration. So I was like It works. And what did I want to show you? Then the simple recipient is just an email address.
The audience that was mandatory in the base package. I made it allowed to be blank. And I will add some functionality because sometimes you cannot send you must change the sender email in some cases. But it's for later. So this is what my backend looks like. It was nice to write And at the end I had to write some HTML for
21:08 Email Markup and Project Takeaways
Speaker 2
for emails which is like dog version of html So the news the newsletter package was provided with MGML I did never write this kind of things, but it's quite cool. You write something in XML which is compiled into good looking HTML for email clients. But I have kind of mixed feelings because in the end you get like table soup
well it works and maybe my code was worse I don't know So here it is. It's 20 minutes already, so we jumped to the conclusion. So this simpa newsletter package it works since last night because I proposed the conference before I finish my development, which was an interesting experience. It was fun to write and it was quite easy because documentation is cool. I have seen some fixes
that I need from my customers, for my clients. So I will do a contribution to add the translations and fixes and make it work well in Outlook because it's not Perfect. Yep. This is it. Thank you.
23:08 Questions
Speaker 1
Great job. Thank you, Anis. Once again. We do have a couple questions here in the chat, so I'm gonna go ahead. and ask those. The first question is simpa hard to set up any big advantages over third party websites like MailChimp if you only do this once in a blue moon?
Speaker 2
So I am not nobs at all, but I think it's quite okay to set up because you have a lot of third-party websites who which propose simpa service. See, even if you don't want to set it up yourself, you can use a provided installation by some hosting services. And I know some people who have a SIMPA server. A lot of organizations like associations do have SIMPA servers. and it
it seems okay, but I'm not the one who can tell you it's easy or not because I'm just a user in the story
Speaker 1
Great, thank you. I have another question here in the chat. And just a reminder, if you do want to ask a question, please go ahead and type it into the chat. And also you could ask in the lobby later on so the next question is from tho and He said I'd love to ask about opportunities to update the Wagtail newsletter package. Have you used that package or would you Have any thoughts on integrating Simpa with it?
Speaker 2
I can open source my backend once it's a little bit more polished And once I'm finished giving one conference every two weeks.
Speaker 1
Okay, and we have another question here from Emma. In terms of email analytics, is your client getting those via the website, the third-party email client, or Simpa itself?
Speaker 2
I'm not sure Simpa is doing email analytics. It says if you have bounces, you can know it. But you have no easy so let me so Simpa tells you if you have bounces. It deals with it, it's its job, and it does it very well. If you want to know if your email was open, you should add your tracking in the in the content, in the email content. But you won't have necessarily
all opening because sometimes people do not download distant data and so on. So Simpa does not the tracking of opening emails, but it will deal with the mailing list and it will do it well.
Speaker 1
Okay. Yeah, very good. Thank you. Very useful information. Thanks again, Anyase, and we will see you around in the lobby and we'll go ahead and end this session a couple minutes early. Thanks, everyone.
Speaker 2
Bye. Thank you.