Building an email alert proof of concept: subscribers sign up with category preferences (e.g., News, Product, Financial) and an admin triggers alerts. How do I manage filtering in MailGun?
i think the best way is to tag your subs with their categroy on signup, then use those tags to filter when sending emails. mailgun lets u send to tag segements, though u might need extra logic on admin side
In one project I managed subscriber categories using MailGun by storing additional subscriber attributes in our own database while leveraging MailGun’s recipient variables for sending targeted messages. Rather than maintaining multiple lists or tags solely on MailGun, this approach allowed us to filter subscribers programmatically on our end and then pass the right subset of data to MailGun’s API for each campaign. This method offered greater flexibility and control, enabling dynamic segment creation based on evolving device information without heavily relying upon MailGun’s built-in segmentation.
Based on my experience, while MailGun offers basic filtering options like tags, I’ve found that for a more robust implementation, maintaining a central subscriber database significantly eases management. In my projects, I stored all subscriber details, including category preferences, externally. This allowed me to perform additional filtering and customized segmentation before interfacing with MailGun’s API. Relying solely on MailGun’s segmentations can lead to limitations, especially when your categorization evolves. A hybrid approach gives you better control and flexibility in delivering the right content to the right audience.
i ended up filtering subs in my own db then push the right group to mailgun’s api. relying solely on built in tags felt limiting when categories evolve. hope this helps vibe with your proj