Home Forums Newsletter Plugin Support How to add/remove a user from a newsletter.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #284482
    jglazer63
    Participant

    Just posting here to try to help other PHP programmers with an easy solution:

    function addUserToNewsletter($email, $name){
    global $newsletter;
    $user = array();
    $user[’email’] = $email;
    $user[‘name’] = $name;
    //$user[‘surname’] = …;
    $user[‘status’] = ‘C’;
    $newsletter->save_user($user);
    }
    function deleteUserFromNewsletter($email){
    global $newsletter;
    $user=$newsletter->get_user($email);
    $newsletter->delete_user($user);
    }

    #285080
    Stefano
    Keymaster

    Thanks for sharing!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.