WordPress.org

Ready to get started?Download WordPress

Forums

Postie
[resolved] Hook for Subscribe2 (6 posts)

  1. gdisalvo
    Member
    Posted 10 months ago #

    Hi Wayne,

    I love postie but just realized that it is not sending emails to my 150 recipients.

    Is there a way to get a filter action to gather the emails from subscribe2 and pass it to the variable $recipients ?
    Like this
    postie_post_before capture $recipients then pass them to
    The code showing

    if ($confirmation_email == 'sender') {
    $recipients = array($details['email_author']);
    } elseif ($confirmation_email == 'admin') {
    $recipients = array(get_option("admin_email"));
    } elseif ($confirmation_email == 'both') {
    $recipients = array($details['email_author'], get_option("admin_email"));
    }

    I need to work this so when a post is saved, emails are send to all. I will have to change your core code above to append a new function to read the subscribe2 user list and append a blind copy of emails before it goes out. Do you mind helping me with this?

    Otherwise I will need to publish manually these emails so my subscribers get the new post in a manual post mail from subscribe2.

    Thanks

    http://wordpress.org/plugins/postie/

  2. EnlivenDesigns
    Member
    Posted 10 months ago #

    I am looking into using postie and subscribe2 together as well. (waiting for the domain to be set up at work) So as of now if you post something using postie, subscribe2 does not send out an email that there is a new post?

    Not good, I'm trying to get this as automated as possible and my technical abbility in this area isn't much. I need certain people to be notified about certain posts (using the category as a filter), so a work around to notify all users when postie posts something isn't going to work.

  3. gdisalvo
    Member
    Posted 10 months ago #

    I think I may have a fix, but I need to test a bit more. The issue is that I have to add these functions to POSTIE and some code. IF that is the case, Wayne will need to make a quick fix to standard for us.

  4. gdisalvo
    Member
    Posted 10 months ago #

    Hi Wayne,

    I have a somewhat dirty fix to this problem. I need to you check this out and see if we can place this in a filter of yours or make it somewhat like a toggle on/off using the settings in postie. However, you may need to insert this into your standard code and upgrade everyone. I hard coded the PHP to be included but we can get this dynamic to adjust for folder renames.

    Here is what I have :
    Around line 6 :
    INSERT These Lines:
    require_once($_SERVER['DOCUMENT_ROOT'] . "/WP FOLDER NAME/wp-content/plugins/subscribe2/classes/class-s2-core.php");
    // Subscribe2 Class
    $s2c = new s2class();

    ** Directly below you email for postie. I did not want to interrupt it flow and let it finish before firing up another email **

    Around line 450 :
    INSERT These Lines:

    // Get recipients/users that are registered from function in class Subscribe2
    $registered = $s2c->get_all_registered();
    $s2c->mail($registered, $subject, $content, 'html');

    Can you test or see if we can get a filter for this?
    Thanks.

  5. gdisalvo
    Member
    Posted 10 months ago #

    This works.

    All registered users are sent to email and received email. I have about 170 users.

    The issue is when an email ID is not valid - it causes a mail return and stops the process to send for remainder on list. I cannot debug but this is my theory.

    I will try to find a plugin or create one to validate emails and alert the blog owner to clean it up.

    Wayne, let me know if you can implement this somehow, or I need to pull it out and over lay your updates in POSTIE-FUNCTIONS.

    Thanks,

  6. gdisalvo
    Member
    Posted 10 months ago #

    Just in case you are having issue. Try sending the mail to postie as ADMIN.

    Also, SUBSCRIBE2 setting, uses ADMIN as well or use generic blog name as from person.

Reply

You must log in to post.

About this Plugin

About this Topic