Blacklist unsubscribes

@mikrokosm - unfortunately there's no easy way to do this. That's because mailwizz's lists are isolated, so a subscriber that unsubscribes from a list or from a customer might still want to be part of other list or customer.
You could write a console command which can go over the unsubscribes in the last 24 hours and add them into blacklist...
 
@twisted1919 "a subscriber that unsubscribes from a list or from a customer might still want to be part of other list or customer"

Thanks for the quick reply! I don't have any customers in mailwizz other than myself and I don't want to mail to a subscriber from any other lists once they unsubscribed from one of my lists.
 
Hello,
I have created a console command for you, is attached here. But keep in mind that we don't encourage you to use this, since it can break the application logic of handling the blacklisted emails in certain scenarios. So, please use it with caution, test it first to see if is doing the job you need exactly.

Just to understand its logic: it selects all the subscribers in the system with the status UNSUBSCRIBED that are not already in the blacklist and is marking them as blacklisted. Remember we are speaking about the global blacklist here.

Copy the file in /YOURWEBROOT/apps/console/commands/

To run it use:
Code:
php -q /YOURWEBROOT/apps/console/console.php blacklistunsubscribedlistsubscribers  --verbose=1

Cosmin
 

Attachments

  • BlacklistUnsubscribedListSubscribersCommand.php.zip
    1.4 KB · Views: 5
Back
Top