דואר אלקטרוני בכמות ללא כפילויות

דמיינו שחבר בחר קבוצות ותת-קטגוריות שהוא מעוניין בהן.

אני רוצה לשלוח הודעה למי שבחר כל אחת מהקבוצות ותת-קטגוריות אלו.

דוגמה: בעיר המורכבת מהעיר הגלובלית הראשית, מספר שכונות ועניינים.

המשתמש יכול לבחור:

  • עניין ספציפי (שהוא קבוצה כללית),
  • קבוצה בשכונה שלו עבור עניין זה,
  • קבוצה בשתי שכונות אחרות עבור עניין זה,
  • עניין שני ספציפי (שהוא קבוצה כללית),
  • כל הקבוצות בכל השכונות עבור עניין זה,
  • הקבוצה הראשית של העיר הראשית;

אם אני רוצה לשלוח דוא"ל לקבוצה אחת או יותר או לתת-קטגוריות בקבוצות אלו, חלק מהמשתמשים עלולים לקבל יותר מדוא"ל אחד של אותה הודעה, במיוחד אם האדם בחר את קבוצת העיר הראשית שתעביר את המידע מכל השכונות, בתוספת קבוצות משנה מסוימות, וכו’.

השאלה: כיצד אוכל להכין רשימת תפוצה הנוגעת ליותר מקבוצה אחת ויותר מרשימת תת-קטגוריות, ללא כפילויות, ולשלוח את ההודעה הזו?

  1. האם אני צריך להשתמש בסקריפט חיצוני?

  2. האם אני צריך מעבד דוא"ל חיצוני?

תודה

מארק

אם אתה דורש אספקה מובטחת ללא כפילויות על פני קבוצות וקטגוריות שרירותיות, עליך:\n\n* לייצא רשימות משתמשים מהקבוצות או הקטגוריות הממוקדות.\n* למזג ולהסיר כפילויות מרשימות אלו, באופן ידני או באמצעות סקריפט.\n* להשתמש במעבד דוא"ל חיצוני כדי לשלוח את ההודעה לרשימה ללא כפילויות.\n\nזו הדרך החזקה ביותר להבטיח שמשתמשים לא יקבלו את אותו הודעה מספר פעמים.

תודה, האם אתה יודע אם נוכל להפוך זאת לאוטומטי, כגון בקשת ה-API לקבלת הודעות עבור כל רישום/משיכה של חבר חדש או בחירת קבוצה/קטגוריה, ולקבל רק את השינויים החדשים או (פחות טוב) את הרשימה כולה עם הקבוצה/קטגוריה שלהם, שניתן לבקש על ידי תוכנית Python? (אני יכול לנהל קידוד Python). השאלה היא יותר לגבי תקשורת אוטומטית בין Discourse ל-Python וכן Python למעבד דואר.

Discourse provides a robust REST API that allows you to:

  • List all users, groups, and user-group memberships
  • Monitor new user registrations and group join/leave actions (via polling or webhooks)
  • Retrieve category membership configurations

You can query either the full list or attempt to track recent changes. For full incremental change detection, you may need to implement time-based checks and manage differences locally. Authentication is handled through HTTP headers (Api-Key, Api-Username).

However, for more efficient and integrated control, I recommend creating a custom Discourse plugin. A plugin runs inside the Discourse server environment and provides direct access to Discourse internals, such as:

  • User, group, and category membership updates
  • Lifecycle event hooks for registrations and group changes
  • Direct access to Discourse’s internal APIs and database

This approach gives you real-time capabilities and greater flexibility for implementing automated workflows like mail handling or user segmentation.

האם אנו יכולים ליצור תוסף שיעבוד על המופע שלנו גם אם הוא מתארח על ידי Discourse, או שאנו צריכים לארח אותו?

If it’s an unofficial plugin, I think you can only install it on the Enterprise plan, otherwise you’ll have to self-host it.

  • Generate dynamic lists (user/group/category data) and display or store them within Discourse.
  • Export data to a file, or create downloadable admin reports.
  • Make HTTP(S) requests to another server (e.g., push user list updates to your Python/email tool).
  • Trigger webhooks, schedule tasks, or integrate directly with external APIs—all from inside Discourse, with no polling required.

@EMHmark7 did you end up figuring out how you want to get this working?

In Discourse, one way to get at what you want is to create categories and to let members in the community “subscribe” to those categories by choosing the “watching” notification level. The Default categories watching or Default categories watching first post are handy for having an announcements category on your site, to reach out to everyone on your site.

I believe there are ways to manage the above based on group membership or some other criteria but I haven’t done it myself in a while - maybe somebody else has a recipe they can share.

Another approach is to PM the groups directly - if you send a PM to a handful of groups and the same member is in multiple groups there will not be any duplication.

But it does sound to me like you might be looking for a different tool, if what you want is not a forum or community that people log into to participate in discussions but rather a bunch of mailing lists that sends out email.

All of this can live in code outside Discourse, so you don’t have to install it. If you are using WordPress then you can get a bunch of this for free using GitHub - discourse/wp-discourse: WordPress plugin that lets you use Discourse as the community engine for a WordPress blog, and then use another WordPress plugin to handle the mailing list part.