WordPress.org

Ready to get started?Download WordPress

Forums

check if emails subscribed to categories in subscribe2 (3 posts)

  1. davidbessler
    Member
    Posted 7 years ago #

    The setting:
    I have subscribe2 installed. I am making an email form on my site which will allow users to email other users (yes yes, my site is completely concealed from the public). The php script I have as the template for the email page, takes email addresses from values from the url and prepopulates the recipient input in the email form with a multiple select option list. for example:

    http://mydomain.com/wordpress/?page_id=35&emaillink=somedude@mydomain.com,someotherdude@otherdomain.com,athirddude@yetanother.com

    will prepopulate the recipient box in the form with a select field with all of my users listed, and those three email addresses selected.

    The Challenge:
    I would like to make a link to that form to be able to prepopulate the form with users SUBSCRIBED TO A PARTICULAR CATEGORY.

    The Problem:
    I cannot for the life of me figure out how to find (let alone refer to with PHP) the information in the sql database with the user subscription info.

    The Request:
    Can someone write a few lines for me which cycles through the registered users, checks each one to see if it is subscribed to a certain topic, and if so, add it's email address on the end of the following link:

    http://mydomain.com/wordpress/?page_id=35&emaillink=EMAIL_ADDRESSES_HERE (with a comma between each address)

    Thanks.

  2. davidbessler
    Member
    Posted 7 years ago #

    I've been trying on my own, still no luck. I think the main problem is that I have no idea where subscribe2 stores the table comparing user ids and ctegories subscribed-to. I cannot browse the _subscribe2 database table ... any help would be appreciated.

  3. DMainville
    Member
    Posted 7 years ago #

    The wp _usermeta has the cats which the user subscribes to. userid and s2_subscribed are paired.

Topic Closed

This topic has been closed to new replies.

About this Topic