I have a very basic subscribe form using the API Subscriber.Add (PHP). The form just has the 'name' and 'email' fields.
I can subscribe a new address without any problem - I can see the address in the control panel. I can also unsubscribe the address using Subscriber.Unsubscribe API without problem - I can see that the address is given 'Unsubscribed' status in the control panel
The problem is when I try to re-subscribe the address using Subscriber.Add. The API returns a 0 code and 'Success' message, but the email address sill remains in the unsubscribed state in the control panel. I just can't seem to get the API to re-subscribe it. The only way to re-subscribe the address is to do it manually in the control panel.
I can re-subscribe the address using the standard subscribe form provided by the control panel, so it must be an issue with the API itself. Why is it returning a 'Success' message if it isn't actually re-subbing the address?
I note that the API updates the 'name' field data if I change it, as it should, but it is refusing to re-add the email address into the subscribers list. Very odd.
I'm using the PHP scripts provided, unaltered.
Here's a copy of the debug:
campaignmonitor Object ( [api] => xxx [campaign_id] => [client_id] => [list_id] => xxx [method] => get [url]=> http://api.createsend.com/api/api.asmx [soapAction] => http://api.createsend.com/api/ [curl] => 1 [curlExists] => 1 [debug_level] => 1 [debug_request] => [debug_response] => 0 Success [debug_url] => http://api.createsend.com/api/api.asmx/Subscriber.Add?ApiKey=xxx&ListID=xxx&Email=someaddress%40gmail.com&Name=John%20Smith [debug_info] => Array ( [url]=> http://api.createsend.com/api/api.asmx/Subscriber.Add?ApiKey=xxx&ListID=xxx&Email=someaddress%40gmail.com&Name=John%20Smith [content_type] => text/xml; charset=utf-8 [http_code] => 200 [header_size] => 310 [request_size] => 249 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.226481 [namelookup_time] => 3.6E-05 [connect_time] => 0.11083 [pretransfer_time] => 0.11088 [size_upload] => 0 [size_download] => 245 [speed_download] => 1081 [speed_upload] => 0 [download_content_length] => 245 [upload_content_length] => 0 [starttransfer_time] => 0.226447 [redirect_time] => 0 [headers_sent] => Array (  => User-Agent: CMBase URL Handler 1.5 ) ) [show_response_headers] => 0 )
When you use our subscriberAdd PHP function, you need to specify if you want Add and Resubscribe. ie. instead of using:
$result = $cm->subscriberAdd('email@example.com', 'John Smith');
$result = $cm->subscriberAdd('firstname.lastname@example.org', 'John Smith', $list_id, true);