I'm trying to set up the double opt in feature for registering the users for news letter via API. It's a must according to our law.

I'm using the SOAP Client and I set the attributes and calls via PHP.

I have set up the attributes and everything.The users are being added to the list successfully, however they don't receive the confirmation email. And also the weird thing is that the status of the users are "Active" when they are added to the list on exact target account. According to the documentation, for Double-Opt-in registrations, the user should be added to the list with "Unsubscribed" status and once they clicked the confirmation link in their email then their status should be updated to "Active". To work around this, I enforced the user to be added to the list with "Unsubscribed" status hoping that it might do the trick but no avail. And still the user doesn't receive any confirmation email.

As for the side information, the Double-Opt-in feature is enabled for the list and also the email template with the right confirmation url is also up and set. Everything seems as it supposed to be but still the users are unable to receive confirmation email.

This is how I set the attributes and add the users to the list: (I just wrote part of my code that is relevant to my case)

 $attributes = array(
                    'Double_Opt_in'      => true,
                    'Double_Opt_in_Date' => date('d.m.Y h:m'),
                    'Double_Opt_in_IP'   => $_SERVER['REMOTE_ADDR'],
                    'Checkin_opt_in'     => true,
                    'Country_Code'       => '',
                    'Language'           => ''
    $client = new ExactTargetSoapClient("$wsdl", array('trace' => 1));
            $client->username = "$username";
            $client->password = "$password";

            $subscriber = new ExactTarget_Subscriber();
            $subscriber->EmailAddress = $email;
            $subscriber->SubscriberKey = $email;

        $Double_Opt_in      = new ExactTarget_Attribute();
                $Double_Opt_in->Name = "Double_Opt_in";
                $Double_Opt_in->Value = 'true';

                $Double_Opt_in_Date = new ExactTarget_Attribute();
                $Double_Opt_in_Date->Name = "Double_Opt_in_Date";
                $Double_Opt_in_Date->Value = date('m.d.Y h:i');

                $Double_Opt_in_IP   = new ExactTarget_Attribute();
                $Double_Opt_in_IP->Name = "Double_Opt_in_IP";
                $Double_Opt_in_IP->Value = $_SERVER['REMOTE_ADDR'];

$subscriber->Attributes = array(
$subscriber->Lists = array();
$list->ID = "123456";
$subscriber->Lists[] = $list;

        $so = new ExactTarget_SaveOption();
        $so->PropertyName = "*";
        $so->SaveAction = ExactTarget_SaveAction::UpdateAdd;
        $soe = new SoapVar($so, SOAP_ENC_OBJECT, 'SaveOption', "http://exacttarget.com/wsdl/partnerAPI");
        $opts = new ExactTarget_UpdateOptions();
        $opts->SaveOptions = array($soe);

        $object = new SoapVar($subscriber, SOAP_ENC_OBJECT, 'Subscriber', "http://exacttarget.com/wsdl/partnerAPI");

        $request = new ExactTarget_CreateRequest();
        $request->Options = $opts;
        $request->Objects = array($object);

        $results = $client->Create($request);

Any help is highly appreciated! I'm looking forward to your responses :)

1 Answer 1


Double Opt-in and Welcome emails defined for a list are for use with Web Collect. Adding subscriber to the list via API will not initiate those emails.

More details on Web Collect: http://help.marketingcloud.com/en/documentation/exacttarget/subscribers/web_collect/

It is possible to do double opt-in through the API using a Triggered Send. Create an email that contains the double opt-in link


Then setup a Triggered Send Definition which uses that email, make sure that the Send Classification is setup as Transactional and insure that under Subscriber Management the list they need to be opted into is select with "Add to List" and "Update subscribers" checked.

On the API side, a single request to trigger the email is required, be sure to include the Status of Unsubscribed on the subscribe record to prevent them from being added as Active.

<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
   <Objects xsi:type="TriggeredSend">
      <PartnerKey xsi:nil="true"/>
      <ObjectID xsi:nil="true"/>
         <PartnerKey xsi:nil="true"/>
         <ObjectID xsi:nil="true"/>
         <PartnerKey xsi:nil="true"/>
         <ObjectID xsi:nil="true"/>
         <EmailAddress>[email protected]</EmailAddress>
         <SubscriberKey>[email protected]</SubscriberKey>
            <Name>First Name</Name>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .