Maileon PHP client  1.2.5
Easily integrate your PHP application with Maileon.
com_maileon_api_mailings_MailingsService Class Reference
Inheritance diagram for com_maileon_api_mailings_MailingsService:
com_maileon_api_AbstractMaileonService

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)
 
- 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)
 
 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
 

Detailed Description

Facade that wraps the REST service for mailings.

Author
Marcus Ständer | Trusted Mails GmbH | marcus.staender@trusted-mails.com
Andreas Lange | XQueue GmbH | andreas.lange@xqueue.com

Definition at line 9 of file MailingsService.php.

Member Function Documentation

com_maileon_api_mailings_MailingsService::createMailing (   $name,
  $subject,
  $deprecatedParameter = false,
  $type = "regular" 
)

Creates a new mailing.

Parameters
string$namethe name of the mailing
string$subjectthe subject of the mailing
bool$deprecatedParameterthis parameter was never used by the API
string$typethe type of the mailing, which can be one of 'doi', 'trigger', or 'regular'.
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.

Parameters
integer$idthe ID of the mailing to delete
Returns
com_maileon_api_MaileonAPIResult the result of the operation

Definition at line 85 of file MailingsService.php.

com_maileon_api_mailings_MailingsService::deleteMailing (   $id)

Deletes a mailing by ID.

Parameters
integer$idthe ID of the mailing to delete
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.

Parameters
string$mailingIdthe ID of the mailing to update
string$htmlthe new HTML content of the mailing
bool$doImageGrabbingspecifies if image grabbing should be performed
bool$doLinkTrackingspecifies if link tracking should be performed
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing to update
string$textthe new TEXT content of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the HTML content string of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the TEXT content string of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing to update
string$targetGroupIdthe ID of the target group to set
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the target group id of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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,
  $email 
)

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.

Parameters
string$mailingIdthe ID of the mailing to update
string$emailthe ID of the target group to set
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the sender email address of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing to update
string$subjectthe subject of the mailing to set
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the subject of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing to update
string$senderaliasthe sender alias to set
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing to update
string$recipientaliasthe recipient alias to set
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the reply-to address of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
string$mailingIdthe 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.
Returns
Exceptions
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'

See also
MailingFields
Parameters
string$scheduleTimeThis 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
numberpage_index (default = 1) The index of the result page. The index must be greater or equal to 1.
numberpage_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.
stringorderBy (default = id) The field to order results by
stringorder (default = DESC) The order
Returns
Exceptions
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'

See also
MailingFields
Parameters
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
numberpage_index (default = 1) The index of the result page. The index must be greater or equal to 1.
numberpage_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.
Returns
Exceptions
MaileonException

Definition at line 402 of file MailingsService.php.

com_maileon_api_mailings_MailingsService::sendMailingNow (   $mailingId)

Schedules the mailing to be instantly sent

Parameters
numbermailingId The ID of the mailing to send now
Returns
Exceptions
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.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the target group id of the mailing available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
number$mailingIdthe ID of the mailing
string$doiKeyThe new DOI key.
Returns
Exceptions
MaileonException

Definition at line 457 of file MailingsService.php.

com_maileon_api_mailings_MailingsService::deactivateTriggerMailing (   $mailingId)

Deactivates a trigger mailing by ID.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

Definition at line 483 of file MailingsService.php.

com_maileon_api_mailings_MailingsService::getSchedule (   $mailingId)

Get the schedule for regular mailings by mailing ID.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

Definition at line 496 of file MailingsService.php.

com_maileon_api_mailings_MailingsService::getArchiveUrl (   $mailingId)

Get the archive url for the mailing ID.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.

Parameters
string$mailingIdthe ID of the mailing to update
string$namethe name of the mailing to set
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.

Parameters
string$mailingIdthe ID of the mailing to update
array$tagsthe tags
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.

Parameters
string$mailingIdthe ID of the mailing to update
stringlocale the locale in the form xx: e.g. de, en, fr, …
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif 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, …

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

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.nosp@m.ce@x.nosp@m.queue.nosp@m..com

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

Definition at line 608 of file MailingsService.php.

com_maileon_api_mailings_MailingsService::copyMailing (   $mailingId)

Copy the mailing with the given mailing ID.

Parameters
number$mailingIdthe ID of the mailing
Returns
com_maileon_api_MaileonAPIResult the result of the operation

Definition at line 620 of file MailingsService.php.


The documentation for this class was generated from the following file: