![]() |
Maileon PHP client
1.2.5
Easily integrate your PHP application with Maileon.
|
Public Member Functions | |
createMailing ($name, $subject, $deprecatedParameter=false, $type="regular") | |
getMailingIdByName ($mailingName) | |
checkIfMailingExistsByName ($mailingName) | |
disableQosChecks ($mailingId) | |
setTriggerDispatchLogic ($mailingId, $logic) | |
setTriggerActive ($mailingId) | |
deleteActiveTriggerMailing ($mailingId) | |
deleteMailing ($id) | |
setHTMLContent ($mailingId, $html, $doImageGrabbing=true, $doLinkTracking=false) | |
setTextContent ($mailingId, $text) | |
getHTMLContent ($mailingId) | |
getTextContent ($mailingId) | |
setTargetGroupId ($mailingId, $targetGroupId) | |
getTargetGroupId ($mailingId) | |
setSender ($mailingId, $email) | |
getSender ($mailingId) | |
setSubject ($mailingId, $subject) | |
getSubject ($mailingId) | |
setSenderAlias ($mailingId, $senderalias) | |
setRecipientAlias ($mailingId, $recipientalias) | |
getReplyToAddress ($mailingId) | |
setReplyToAddress ($mailingId, $auto=true, $customEmail=null) | |
getMailingsBySchedulingTime ($scheduleTime, $beforeSchedulingTime=true, $fields=array(), $page_index=1, $page_size=100, $orderBy="id", $order="DESC") | |
getMailingsByTypes ($types, $fields=array(), $page_index=1, $page_size=100) | |
sendMailingNow ($mailingId) | |
getDoiMailingKey ($mailingId) | |
setDoiMailingKey ($mailingId, $doiKey) | |
deactivateTriggerMailing ($mailingId) | |
getTriggerDispatchLogic ($mailingId) | |
getSchedule ($mailingId) | |
getArchiveUrl ($mailingId) | |
setName ($mailingId, $name) | |
getName ($mailingId) | |
setTags ($mailingId, $tags) | |
getTags ($mailingId) | |
setLocale ($mailingId, $locale) | |
getLocale ($mailingId) | |
fillRssSmartContentTags ($mailingId) | |
copyMailing ($mailingId) | |
![]() | |
__construct (array $config) | |
setDebug ($isDebug) | |
isDebug () | |
get ($resourcePath, $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null) | |
put ($resourcePath, $payload="", $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null) | |
post ($resourcePath, $payload="", $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null) | |
delete ($resourcePath, $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null) | |
Additional Inherited Members | |
![]() | |
static | $MAILEON_XML_MIME_TYPE = 'application/vnd.maileon.api+xml' |
![]() | |
appendArrayFields ($params, $name, $fieldValues) | |
![]() | |
$configuration | |
$encodedApiKey | |
$debug = false | |
$throwException = true | |
$proxy_host | |
$proxy_port = 80 | |
$timeout | |
Facade that wraps the REST service for mailings.
Definition at line 9 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::createMailing | ( | $name, | |
$subject, | |||
$deprecatedParameter = false , |
|||
$type = "regular" |
|||
) |
Creates a new mailing.
string | $name | the name of the mailing |
string | $subject | the subject of the mailing |
bool | $deprecatedParameter | this parameter was never used by the API |
string | $type | the type of the mailing, which can be one of 'doi', 'trigger', or 'regular'. |
Definition at line 25 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getMailingIdByName | ( | $mailingName | ) |
Get the ID of a mailing by its name
Definition at line 39 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::checkIfMailingExistsByName | ( | $mailingName | ) |
Check if a mailing with the given name exists and return true or false
Definition at line 47 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::disableQosChecks | ( | $mailingId | ) |
Disable all QoS checks for a given mailing
Definition at line 56 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setTriggerDispatchLogic | ( | $mailingId, | |
$logic | |||
) |
Sets the dispatch logic for trigger mailings
Definition at line 64 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setTriggerActive | ( | $mailingId | ) |
Used for DOI Mailings
Definition at line 73 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::deleteActiveTriggerMailing | ( | $mailingId | ) |
Deletes an active trigger mailing.
integer | $id | the ID of the mailing to delete |
Definition at line 85 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::deleteMailing | ( | $id | ) |
Deletes a mailing by ID.
integer | $id | the ID of the mailing to delete |
Definition at line 97 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setHTMLContent | ( | $mailingId, | |
$html, | |||
$doImageGrabbing = true , |
|||
$doLinkTracking = false |
|||
) |
Updates the HTML content of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $html | the new HTML content of the mailing |
bool | $doImageGrabbing | specifies if image grabbing should be performed |
bool | $doLinkTracking | specifies if link tracking should be performed |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 118 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setTextContent | ( | $mailingId, | |
$text | |||
) |
Updates the TEXT content of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $text | the new TEXT content of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 139 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getHTMLContent | ( | $mailingId | ) |
Fetches the HTML content of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 155 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getTextContent | ( | $mailingId | ) |
Fetches the TEXT content of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 171 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setTargetGroupId | ( | $mailingId, | |
$targetGroupId | |||
) |
Updates the target group id of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $targetGroupId | the ID of the target group to set |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 188 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getTargetGroupId | ( | $mailingId | ) |
Fetches the target group id of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 204 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setSender | ( | $mailingId, | |
) |
Updates the sender email address of the mailing referenced by the given ID.
Note: if not only the local part but also the domain is provided, make sure that is exists in Maileon.
string | $mailingId | the ID of the mailing to update |
string | the ID of the target group to set |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 222 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getSender | ( | $mailingId | ) |
Fetches the sender email address of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 238 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setSubject | ( | $mailingId, | |
$subject | |||
) |
Updates the subject of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $subject | the subject of the mailing to set |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 255 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getSubject | ( | $mailingId | ) |
Fetches the subject of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 271 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setSenderAlias | ( | $mailingId, | |
$senderalias | |||
) |
Updates the senderalias of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $senderalias | the sender alias to set |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 288 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setRecipientAlias | ( | $mailingId, | |
$recipientalias | |||
) |
Updates the recipientalias of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $recipientalias | the recipient alias to set |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 305 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getReplyToAddress | ( | $mailingId | ) |
Fetches the reply-to address of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 321 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setReplyToAddress | ( | $mailingId, | |
$auto = true , |
|||
$customEmail = null |
|||
) |
Sets the reply-to address of the mailing identified by the given ID.
string | $mailingId | the ID of the mailing |
bool | $auto | (default = true) If true, the Maileon autorecognition will be used and emails will be saved within Maileon. If false, a custom email address can be passed which gets all mails forwarded. |
string | $customEmail | (default = empty) If $auto is false, this email will be used for manual responses. |
MaileonException |
Definition at line 338 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getMailingsBySchedulingTime | ( | $scheduleTime, | |
$beforeSchedulingTime = true , |
|||
$fields = array() , |
|||
$page_index = 1 , |
|||
$page_size = 100 , |
|||
$orderBy = "id" , |
|||
$order = "DESC" |
|||
) |
Types can be selected from 'doi','trigger', 'trigger_template' or 'regular'
string | $scheduleTime | This is a date and time string that defines the filter for a mailing. The mailings before and after that time can be queried, see beforeSchedulingTime. The format is the standard SQL date: yyyy-MM-dd HH:mm:ss |
bool | $beforeSchedulingTime | (default = true) If true, the mailings before the given time will be returned, if false, the mailings at or after the given time will be returned. |
string[] | fields (default = empty) This list contains the fields that shall be returned with the result. If this list is empty, only the IDs will be returned. Valid fields are: state, type, name, and scheduleTime | |
number | page_index (default = 1) The index of the result page. The index must be greater or equal to 1. | |
number | page_size (default = 100) The maximum count of items in the result page. If provided, the value of page_size must be in the range 1 to 1000. | |
string | orderBy (default = id) The field to order results by | |
string | order (default = DESC) The order |
MaileonException |
Definition at line 370 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getMailingsByTypes | ( | $types, | |
$fields = array() , |
|||
$page_index = 1 , |
|||
$page_size = 100 |
|||
) |
Types can be selected from 'doi','trigger', 'trigger_template' or 'regular'
string[] | $types This is the list of types to filter for |
string[] | fields (default = empty) This list contains the fields that shall be returned with the result. If this list is empty, only the IDs will be returned. Valid fields are: state, type, name, and scheduleTime |
number | page_index (default = 1) The index of the result page. The index must be greater or equal to 1. |
number | page_size (default = 100) The maximum count of items in the result page. If provided, the value of page_size must be in the range 1 to 1000. |
MaileonException |
Definition at line 402 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::sendMailingNow | ( | $mailingId | ) |
Schedules the mailing to be instantly sent
number | mailingId The ID of the mailing to send now |
MaileonException |
Definition at line 424 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getDoiMailingKey | ( | $mailingId | ) |
Fetches the DOI mailing key of the mailing identified by the given ID.
number | $mailingId | the ID of the mailing |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 442 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setDoiMailingKey | ( | $mailingId, | |
$doiKey | |||
) |
Sets the key of the DOI mailing identified by the given ID.
number | $mailingId | the ID of the mailing |
string | $doiKey | The new DOI key. |
MaileonException |
Definition at line 457 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::deactivateTriggerMailing | ( | $mailingId | ) |
Deactivates a trigger mailing by ID.
number | $mailingId | the ID of the mailing |
Definition at line 469 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getTriggerDispatchLogic | ( | $mailingId | ) |
Get the dispatch data for a trigger mailing by mailing ID.
number | $mailingId | the ID of the mailing |
Definition at line 483 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getSchedule | ( | $mailingId | ) |
Get the schedule for regular mailings by mailing ID.
number | $mailingId | the ID of the mailing |
Definition at line 496 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getArchiveUrl | ( | $mailingId | ) |
Get the archive url for the mailing ID.
number | $mailingId | the ID of the mailing |
Definition at line 508 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setName | ( | $mailingId, | |
$name | |||
) |
Updates the name of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | $name | the name of the mailing to set |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 525 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getName | ( | $mailingId | ) |
Get the name for the mailing by mailing ID.
number | $mailingId | the ID of the mailing |
Definition at line 537 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setTags | ( | $mailingId, | |
$tags | |||
) |
Updates the tags of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
array | $tags | the tags |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 554 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getTags | ( | $mailingId | ) |
Get the tags for the mailing identified by mailing ID.
number | $mailingId | the ID of the mailing |
Definition at line 566 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::setLocale | ( | $mailingId, | |
$locale | |||
) |
Updates the locale of the mailing referenced by the given ID.
string | $mailingId | the ID of the mailing to update |
string | locale the locale in the form xx: e.g. de, en, fr, … |
com_maileon_api_MaileonAPIException | if there was a connection problem or a server error occurred |
Definition at line 583 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::getLocale | ( | $mailingId | ) |
Get the locale for the mailing identified by mailing ID in the form xx: e.g. de, en, fr, …
number | $mailingId | the ID of the mailing |
Definition at line 595 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::fillRssSmartContentTags | ( | $mailingId | ) |
Execute the RSS SmartMailing functionality for mailings, i.e. fill all SmartMailing Tags from the described RSS-Feeds. For more information about RSS-SmartMailing, please check our customer support at servi ce@x queue .com
number | $mailingId | the ID of the mailing |
Definition at line 608 of file MailingsService.php.
com_maileon_api_mailings_MailingsService::copyMailing | ( | $mailingId | ) |
Copy the mailing with the given mailing ID.
number | $mailingId | the ID of the mailing |
Definition at line 620 of file MailingsService.php.