Unsubscription toolkit

  • Pablo
  • Pablo's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #1 by Pablo
Unsubscription toolkit was created by Pablo
I need to update my subscribers list. I have to remove hundreds of them.

Is there any way to do this?

In Toolkit there is not any tool.

I think NS Pro has not API support.

Any suggestion?

Please Log in or Create an account to join the conversation.

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
1 month 1 week ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic Unsubscription toolkit
Hello Pablo and thank you for posting.

I understand what you are saying. Something like the Mass Email Import tool, but for deletion.
We don't have something like that at the moment, but there are some functions that you could potentially use.

First, load the lib.php file.
Code:
require_once(JPATH_ADMINISTRATOR.'/components/com_nspro/lib.php');

Option 1
You can find the subscriber ids from the database (the existing functions only allow one by one, but you could do it directly from the database in your code).
Code:
GetSubscriberByEmail($email)

Then you can delete each subscriber by id.
Code:
DoDeleteSubscriber($sub_id)

Option 2
You can update your subscribers, and add some distinctive information that you can later use via the interface to delete them.
Code:
add_or_update_subscriber($name, $email, $datetime, $conf, $mailing_lists);

For example:
Code:
add_or_udpate_subscriber('TO DELETE', 'email-here', '2026-08-31 10:00:00', false, '');

Then you can search 'TO DELETE' in your administrator, set the pagination to all, select all and delete.

Hope this helps.

Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

  • Pablo
  • Pablo's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #3 by Pablo
Replied by Pablo on topic Unsubscription toolkit
Thank you, Christopher.

I've created a script to delete subscribers from a CSV file (with IA help).

It's attached.

Please Log in or Create an account to join the conversation.

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
1 month 1 week ago #4 by Christopher Mavros
Replied by Christopher Mavros on topic Unsubscription toolkit
Thank you for sharing, Pablo.

I read the file and it looks very nice, especially for the Spanish speaking audience! 

Let me know if you need any further assistance!

Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros