Your software
My Mautic version is: 2.16.1
My PHP version is: 7.3.16
Your problem
My problem is:
I set up a global category called “Test”.
I set up a segment using a custom field “Active Lease” (where active lease is equal to 1)
I set up a contact with active lease = 1 and a category of “Test”.
I sent out an email with the the segment “Active Lease” and category “Test” selected.
The contact received the email.
The contact unsubscribed from the “Test” category. (I don’t allow unsubscribing from segments)
I verified that the category was removed from the contact.
I sent a second email selecting the same segment and category.
The contact that had unsubscribed from the “Test” category, still got the second email.
How do I make sure that people that unsubscribe from a category don’t get any more emails that have that category set? My only thought was that they received the email because they are still in the segment “Active Lease”. I wouldn’t think that would be the desired outcome because you could have different categories using the same segments.
The segment should be updated every few minutes if the contact doesn’t match the filter of the segment anymore it should be removed, unless the contact was added manually to the segment and not via the filters in which I believe the one way to remove the contact from the segment is either manually or via campaign action.
If the contact is not in the segment anymore it should not received the segment email.
The other alternative would be to use a campaign email and do further checks at the time of sending the email
I didn’t set up the segment up to also check the category. I wouldn’t think that you would have to do that. As long as the contact is in that category, and I am sending an email out with that category selected, I would think that the contact shouldn’t be getting that email. Even if they are still part of the segment. It seems like a category doesn’t supersede a segment.
The only thing I could do is add that category filter to the segment, but that doesn’t make a lot of sense to me. Because what if I want to use that segment for contacts in different categories. That means I would have to keep adjusting the segment filter.
It just seems the desired outcome should be that if a contact unsubscribes from a category, and I send an email out with that category, they should not get the email. Regardless if they match the segment filter. I could be wrong, and maybe this is how it is intended to work.
I think you might be confusing the use of a category in the email, the category is only to categorise the email and it has nothing to do with contacts in the same category.
The segment email only uses the segment to make a decision on who to send the emails to.
If that is true, then why do they allow a contact to unsubscribe from a category? Watch this video that Mautic has on YouTube: https://youtu.be/lROLD5Ik_B8
You are updating your preferences one of them being a category, not unsubscribing from a category.
When you create the segment email the description is quite clear.
Anyway, that how a understand it. Maybe I am wrong.