Mailwizz API ignore details data when create subscriber

Fiorino

New Member
Hi,
I register subscribers via API but I have a problem. I use function like this:

$response = $endpoint->createUpdate('vh063l971q3a9', array(
'EMAIL' => 'xxxxxxx@gmail.com',
'FNAME' => 'xxxxxx',
'LNAME' => 'xxxxx',
'details' => array('status' => 'confirmed', 'ip_address' => $_SERVER['REMOTE_ADDR'])
));

but details is ignored.

I check the code, and I found a small bug:
- when create subscriber the API use method MailWizzApi_Http_Client::METHOD_POST (MailWizzApi/EndPoint/ListSubscribers.php at line 78)
- in MailWizz Application in file /apps/api/controllers/List_subscribersController.php at line 350 I have this code:
PHP:
$details = (array)$request->getPut('details', array());
function $request->getPut return null I need to replace this with $request->getPost
 
Still another problem, with this modification subscribers are confirmed and ip address stored correctly, but the system send "Please confirm your subscription". If subscriber is already confirmed, he not need to receive this email.
 
To fix "Please confirm your subscription" email I have replaced in file /apps/api/controllers/List_subscribersController.php at line 380 this:
PHP:
if ($list->opt_in == Lists::OPT_IN_DOUBLE) {
with this
PHP:
if ($subscriber->status==ListSubscriber::STATUS_UNCONFIRMED) {
 
Hi,
"Please confirm your subscription" email is not fixed in new version (1.3.5.9), when I register some subscriver via API (with CONFIRMED status) then the subscriber receive always confirmation email if list is set with double opt.
 
@Fiorino - You need to use single opt-in if you don't need an email sent out for confirmation, otherwise it would violate the can-spam laws.
 
ok but this subscription come from API, I already confirmed registered user emails in my cms. I also have subscription form for guest users, guest user need double opt but registered users not. otherwise parameter to set status is not useful, are all unconfirmed and all need to confirm subscription?!?
 
Back
Top