delete() public method

public delete ( string $endpointUrl ) : stdClass
$endpointUrl string
return stdClass
 public function listremoveAction($listname)
 {
     $mailgun = new Mailgun($this->private_key, $this->APIURL, "v3", true);
     $listAddress = $listname . $this->GROUPEMAIL;
     $result = $mailgun->delete("lists/{$listAddress}");
     return $this->JsonResponse($result);
 }
Exemplo n.º 2
0
 function mg_delete_subscriber($email_id)
 {
     $key = get_instance()->config->item('mailgun_key');
     $mg = new Mailgun($key);
     $list_address = get_instance()->config->item('newsletter_address');
     # Issue the call to the client.
     $result = $mg->delete("lists/{$list_address}/members/{$email_id}");
 }