Пример #1
0
 /**
  * Send a newsletter test to the given recipients.
  *
  * @param int    $ID         of the current newsletter
  * @param string $recipients A JSON array of recepients with items {"Email" : "...", "Name" : "...."}
  */
 public function sendTest($ID, $recipients)
 {
     $this->name = $this->name . "/{$ID}/test";
     return parent::create(array('Recipients' => $recipients));
 }
Пример #2
0
 /**
  * Managing the lists for a single contact. Subscribe the contact to the given contact lists.
  *
  * @see http://dev.mailjet.com/email-api/v3/contact-managecontactslists/
  * @see http://dev.mailjet.com/guides/#subscribe-to-a-list
  *
  * @param string $ID            id of the current contact
  * @param array  $ContactsLists containing contactlists values
  *
  * @return Contact
  */
 public function manageContactInContactLists($ID, array $ContactsLists)
 {
     if (!is_integer($ID)) {
         throw new Exception\InvalidArgumentException('You must specify a valid ID');
     }
     $this->name = $this->name . "/{$ID}/managecontactslists";
     return parent::manage(array(), array('ContactsLists' => $ContactsLists), false);
 }
Пример #3
0
 /**
  * Retrieve the import background job status.
  *
  * @param int $JOBid id of the job
  *
  * @return Contactslist
  */
 public function getImportListStatus($JOBid)
 {
     $this->name = $this->name . "/{$JOBid}/importlist";
     return parent::getView($JOBid, array(), false);
 }