I'm trying to incorporate a 'Register interest' button into a website which when signing up will assign register the user to a user role and then when a custom field is updated in the property (CPT) it will automatically send out an email to the users who are assigned to a role letting them know a property is now available.
I have many properties in the custom post type which have a relationship to another custom post type 'court' so I've setup different user roles. If a user wants to be emailed about more than one courts properties then they will be assigned to multiple roles.
I thought by using the plugin, 'Better notifications for WordPress' with some of its premium add-ons would do the trick but this doesn't let me set a conditional rule on a custom field and only works if any property status has been published.
I've also tried setting up Mailchimp and collecting different emails on the site which would go into separate lists of the courts but I can't find anything which then allows me to setup a automatic email to go out these lists.
I did read about doing this manually through the wp_mail function following a tutorial on Smashing magazine, https://www.smashingmagazine.com/2015/05/building-wordpress-notification-system/ but reading the comments it talks the risks of being blacklisted.
Does anyone know of any solutions / plugins which could help me build this in?