dimanche 6 juillet 2014

cannot get subscribers email to mailchimp2.0


Vote count:

0




this seems pretty straightforward but i just can't get mailchimp to get the emails. I have a checkbox and all I want to do is say, if check then subscribe. I get an error 500 and I have no idea where to go with this.



<?php echo CHtml::CheckBox('[subscribe]',true, array ( 'value'=>'yes',)); ?>


if ( $_POST['subscribe'])
{
Yii::import('application.vendors.mailchimp');
$mailchimp = new Mailchimp(Yii::app()->params['mailchimp']['key']);
$listId = '*******';
$email = array(
'email' => trim($_POST['User']['email']));
$subscriber = $mailchimp->list->subscribe(
$listId,
$email,
$merge_vars=null,
false,
false
);
}


asked 30 secs ago






Aucun commentaire:

Enregistrer un commentaire