WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
need unsubscribe action link in email template (5 posts)

  1. superbogel
    Member
    Posted 2 years ago #

    Hi,

    how do we add an unsubscribe button link into the email template, so when I click on it, it will auto unsubscribe instead of going to the form again?

    Please advise.

    thank you

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @superbogel,

    You would need to edit the code to accomplish this. Subscribe2 is designed to allow emails to be sent by putting several subscriber addresses into the BCC header. Since the unsubscribe link is user unique adding it to a BCC header would not work so the feature you describe is not implemented.

  3. superbogel
    Member
    Posted 2 years ago #

    @MattyRob, can you point me out which part to start 1st? thank you for your advise!

  4. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @superbogel,

    If you are looking to edit the code and make that task as simple as possible make sure you set the number of recipients per email to 1 in Subscribe2->Settings - that will avoid the need to mess with BCC headers.

    Then you would be best served by adding a line of text with the {ACTION} keyword to the email template.

    Finally, presuming you are using per-post notifications, you would need to make some edits to the publish() function where the body of the emails are prepared (around line 710) adding something like this for each email type:
    $body = str_replace("{ACTION}", $this->unsubscribe, $body);

  5. superbogel
    Member
    Posted 2 years ago #

    @MattyRob, thank you very much this will be very interesting, I will try and give it a shot there :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags