• Resolved prajaktag

    (@prajaktag)


    Hello,

    We used our plugin to add data to Mailpoet 3 list using API.

    $options = array(
    ‘send_confirmation_email’ => true,
    ‘schedule_welcome_email’ => true,
    );
    $subscriber_id = \MailPoet\API\API::MP(‘v1’)->addSubscriber( $subscriber_data, $lists, $options );

    Used this option code while adding the contact to list but we didn’t receive any confirmation email. Any idea why this happens?

    It’s urgent.

    ~Prajakta.

    The page I need help with: [log in to see the link]

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

    Are you talking about welcome email or confirmation email? In both cases, please make sure that your sending method is configured along with the from/reply-to email address under Settings (try sending a test email to make sure). We’ve just tried using the following code:

    
    $subscriber_data = array(
      'email' => 'john.doe@example.com',
      'first_name' => 'John',
      'last_name' => 'Doe'
    );
    $options = array(
      'send_confirmation_email' => true,
      'schedule_welcome_email' => true
    );
    $lists = array(2); // "my first list" that's created by the plugin by default
    $subscriber = \MailPoet\API\API::MP('v1')->addSubscriber($subscriber_data, $lists, $options);
    

    …and received the confirmation email: https://i.imgur.com/iDxypLq.png

    Cheers,
    MailPoet Team.

    Thread Starter prajaktag

    (@prajaktag)

    Thanks for your reply.

    We did exactly same as you described. It’s not working.

    Here is code we used – https://goo.gl/hgBX65

    $lists = array( $list_id );//list should be in array format;

    $is_double_optin = false;

    if($d_optin == ‘1’){
    $is_double_optin = true;
    }

    $options = array(
    ‘send_confirmation_email’ => $is_double_optin, // default: true
    ‘schedule_welcome_email’ => $is_double_optin ,// default: true
    );

    $subscriber_id = \MailPoet\API\API::MP(‘v1’)->addSubscriber( $subscriber_data, $lists, $options );

    Still, we are not able to receive the confirmation email. Contact get added to list directly as the unconfirmed subscriber.

    Any solution for this?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Confirmation email issue’ is closed to new replies.