![]() |
Maileon PHP client
1.3.2
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) | |
| addAttachmentFromFile ($mailingId, $filename, $contentType, $attachmentFileName=null) | |
| addAttachment ($mailingId, $filename, $contentType, $contents) | |
| getAttachments ($mailingId) | |
| getAttachment ($mailingId, $attachmentId) | |
| getAttachmentsCount ($mailingId) | |
| deleteAttachments ($mailingId) | |
| deleteAttachment ($mailingId, $attachmentId) | |
| copyAttachments ($mailingId, $srcMailingId) | |
| getCustomProperties ($mailingId) | |
| addCustomProperties ($mailingId, $properties) | |
| updateCustomProperty ($mailingId, $property) | |
| deleteCustomProperty ($mailingId, $propertyName) | |
| sxml_append (SimpleXMLElement $to, SimpleXMLElement $from) | |
Public Member Functions inherited from com_maileon_api_AbstractMaileonService | |
| __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, $contentType=null, $contentLength=null) | |
| delete ($resourcePath, $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null) | |
Additional Inherited Members | |
Static Public Attributes inherited from com_maileon_api_AbstractMaileonService | |
| static | $MAILEON_XML_MIME_TYPE = 'application/vnd.maileon.api+xml' |
Protected Member Functions inherited from com_maileon_api_AbstractMaileonService | |
| appendArrayFields ($params, $name, $fieldValues) | |
Protected Attributes inherited from com_maileon_api_AbstractMaileonService | |
| $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 service@xqueue.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.
| com_maileon_api_mailings_MailingsService::addAttachmentFromFile | ( | $mailingId, | |
| $filename, | |||
| $contentType, | |||
$attachmentFileName = null |
|||
| ) |
Read a binary file from the file system and adds it as an attachment to this transaction.
| type | $mailingId | |
| type | $filename | |
| type | $contentType | |
| type | $attachmentFileName | Name of the file in the attachments |
| com_maileon_api_MaileonAPIException |
Definition at line 636 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::addAttachment | ( | $mailingId, | |
| $filename, | |||
| $contentType, | |||
| $contents | |||
| ) |
Adds an attachment to the mailing with the provided id.
| int | $mailingId | The mailing id |
| string | $filename | Filename of the attachment to be displayed in sent emails. It is recommended to keep the filename short and to use an extension corresponding to the mime type of the attachment. |
| string | $contentType | The mime type of the attachment |
| string | $contents | The file content |
Definition at line 663 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::getAttachments | ( | $mailingId | ) |
Returns a list of the registered attachments for the mailing with the provided id.
| int | $mailingId |
Definition at line 674 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::getAttachment | ( | $mailingId, | |
| $attachmentId | |||
| ) |
Returns the attachment with the provided id as a file.
| int | $mailingId | |
| int | $attachmentId |
Definition at line 685 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::getAttachmentsCount | ( | $mailingId | ) |
Returns the count of available attachments in the mailing with the provided id.
| int | $mailingId |
Definition at line 695 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::deleteAttachments | ( | $mailingId | ) |
Deletes all the attachments that belong to the mailing with the provided id. The mailing should not be sealed.
| int | $mailingId |
Definition at line 705 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::deleteAttachment | ( | $mailingId, | |
| $attachmentId | |||
| ) |
Deletes the attachment with the provided id from the mailing. The mailing should not be sealed.
| int | $mailingId | |
| int | $attachmentId |
| com_maileon_api_MaileonAPIException |
Definition at line 718 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::copyAttachments | ( | $mailingId, | |
| $srcMailingId | |||
| ) |
Copies the attachments of a source mailing into a target mailing. Note that the target mailing should not be sealed and that the resulting total count of attachments in the target mailing should not exceed 10.
| int | $mailingId | |
| int | $srcMailingId |
Definition at line 731 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::getCustomProperties | ( | $mailingId | ) |
Returns a list of custom properties for the mailing with the provided id.
| int | $mailingId |
Definition at line 743 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::addCustomProperties | ( | $mailingId, | |
| $properties | |||
| ) |
Adds a list of custom properties to the mailing with the provided id.
| int | $mailingId | |
| array | $properties | Array of com_maileon_api_mailings_CustomProperty or single property |
Definition at line 755 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::updateCustomProperty | ( | $mailingId, | |
| $property | |||
| ) |
Updates a custom property of the mailing with the provided id.
| int | $mailingId | |
| com_maileon_api_mailings_CustomProperty | $property |
Definition at line 778 of file MailingsService.php.
| com_maileon_api_mailings_MailingsService::deleteCustomProperty | ( | $mailingId, | |
| $propertyName | |||
| ) |
Deletes a custom property of the mailing with the provided id.
| int | $mailingId | |
| string | $propertyName | The name of the property to delete |
Definition at line 796 of file MailingsService.php.