Support » Plugin: MailPoet - emails and newsletters in WordPress » GDPR requires a new confirmation for old members, new list?

  • Hi,
    GDPR requires a new confirmation for old members, users who are already on a newsletter list. Who uses mailchimp is sending new mail for confirm the registration. How can we do it with mailpoet?
    I create a new list, I enter the old users in the new list, I change the email confirmation of registration (with a text suitable for the GDPR, and many excuses for the trouble…) and re-send the confirmation request to everyone in the new list?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    i am dealing with the same problem right now. We used collected email addresses of our long time customers, but it’s time for a better, GDPR compliant way.

    I did it other way, I created a button with a link created using custom shortcode which includes subscriber email. This link (written in PHP) just logs these confirmed e-mail addresses and redirects to a “thank you” page.
    After some time I just collect these addresses and make a new list.
    It’s not a double opt-in, but I have received messages from renowned companies that do it this way (just clicking a button).

    However, I feel dissapointed, I was pretty sure that I am not the only one dealing with a similar issue and this will be a feature in the recent version…


    Can you share your code for button with a link and shortcode?




    @barbarawebnauta Thank you, good idea! I have done it like this (but without creating a new list).

    Hello @sklemenc,

    So I appended this code to the functions.php in my theme (twenty-twelve)

    add_filter('mailpoet_newsletter_shortcode', 'mailpoet_custom_shortcode_reconfirm_link', 10, 5);
    function mailpoet_custom_shortcode_reconfirm_link($shortcode, $newsletter, $subscriber, $queue, $newsletter_body) {
      // always return the shortcode if it doesn't match your own!
      if ($shortcode !== '[custom:reconfirm_may2018]') return $shortcode;
      $data = base64_encode($subscriber->email);
      $text = 'ACCEPT BUTTON';
      $reconfirm_link = "<a href='{$data}' style='color: #008080; font-weight: bold; font-size: larger;'>{$text}</a>";
      return $reconfirm_link;

    Then there is [custom:reconfirm_may2018] tag in the text of my newsletter.

    and the email_confirm_2018.php looks as following (I rewrote some parts which include some of the libr):

     * GDPR reconfirm, may 2018
     * Table reconfirm
     *  CREATE TABLE mydb.reconfirm (
    email VARCHAR( 100 ) NOT NULL ,
    PRIMARY KEY ( email )
    ) ENGINE = InnoDB 
    $SQL_CONN = new CMySQL_connection(MY_DB_DESCRIPTOR); //connect s DB
    	$data = base64_decode($_GET['data']);
    	$email = BF_sql_safe_string($data); // my anti SQL injection function
    	$sql = sprintf("INSERT INTO <code>reconfirm</code> VALUES('%s', '%s')", $email, BF_sql_datetime());
    	$sql_q = $SQL_CONN->query($sql);
    		trigger_error('Fault of GDPR reconfirm. SQL Query: '.$sql.' MySQL chyba: '.$SQL_CONN->error(), E_USER_WARNING);
    	$thank_you_link = '';
    else // faulty data, but redirecting anyway
    	$thank_you_link = ''; 
    // redirecting
    header('Location: '.$thank_you_link);

    And finally, in a couple of days I will close it and collect the confirmed addresses.

    • This reply was modified 4 years, 2 months ago by jakuvo.
    • This reply was modified 4 years, 2 months ago by jakuvo.

    Thank you for code.
    Can you please explain [custom:reconfirm_may2018], the shortcode to insert in newsletter.

    I did it as described, but it did not work for me.


    Hi @sklemenc,
    it is my custom shortcode, defined in my theme’s functions.php, you need to append it manually. See my post above, 5th line of the first code example.

    I think the problem is in the version of Mailpet. I`m using Mailpet 2.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘GDPR requires a new confirmation for old members, new list?’ is closed to new replies.