1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 SQL query to change user state based on bounced emails ?

Discussion in 'XenForo Questions and Support' started by king8084, Sep 13, 2015.

  1. king8084

    king8084 Active Member

    i have a list of almost 2000 bad emails, what query can i run to change them all to bounced ?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is no way of identifying records in the user table with 'bad' email addresses so it would require a script to loop through the list.

    However, the system will automatically set the accounts to 'Email invalid (bounced)'.
     
  3. king8084

    king8084 Active Member

    i already know the 2000 emails...i have a record of them...i want a way to say "set user X with email Y to bounced"
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The basic query syntax is:
    Code:
    UPDATE xf_user SET user_state = 'email_bounce' WHERE email = 'example@example.com';
    You would have to run that query for each email address.

    Take a backup first before doing any direct changes to the database.
     

Share This Page