Interface Inx_Api_Sending_Sending

Description

An Inx_Api_Sending_Sending represents a sending of a mailing to a set of recipients. individual sendings, corresponding to the sending of the mailing to one specific recipient. usually only sent once. objects, use the Inx_Api_Sending_SendingHistoryManager.

An Inx_Api_Sending_Sending represents a sending of a mailing to a set of recipients. Each sending may contain many individual sendings, corresponding to the sending of the mailing to one specific recipient. A regular mailing is usually only sent once. A trigger mailing on the other hand, may be sent many times. To retrieve Sending objects, use the Inx_Api_Sending_SendingHistoryManager. Accessible sending data

The following data regarding sendings can be accessed:

  • The ID of the mailing being sent
  • The ID of the list containing the mailing
  • The IDs of the recipients who have been mailed
  • The start date of the sending
  • The end date of the sending
  • The date of the last modification to the sending
  • The state of the sending
  • The type of the mailing being sent
  • The total size of the sending in bytes
  • The mailing and protocol state

You can fetch accumulated report data of a sending using the getReportData() method. Be aware that this method performs a separate server call. The Inx_Api_Sending_SendingReport object contains the following data:

  • The number of mailings which have been opened
  • The number of recipients who clicked on any link of the mailing
  • The number of sent mails, including those which bounced
  • The number of sent mails, excluding those which bounced
  • The number of bounced mails
  • The number of mails which have not been sent
  • The average mail size
  • The Inx_Api_GeneralMailing_GeneralMailing corresponding to this sending

Alternatives for accessing sending recipients

If you need to know, for example, which recipients opened the mailing, you should retrieve an Inx_Api_Sending_IndividualSendingRowSet or an Inx_Api_Sending_SendingRecipientRowSet:

  • The Inx_Api_Sending_IndividualSendingRowSet allows to determine whether a recipient opened a mail, clicked on a link or caused a bounce and gives detailed information regarding the state of this individual sending.
  • In addition, the Inx_Api_Sending_SendingRecipientRowSet gives access to recipient meta data, mainly recipient attributes (columns in Inxmail Professional). The access is read-only though.
  • To manipulate the recipients, use the findRecipients($oRecipientContext) method to get a fully featured Inx_Api_Recipient_RecipientRowSet. This row set will contain no reaction data though.
If you need to consider the reaction of the recipients and need to manipulate them, you have to do this in two stages:
  1. Collect the relevant recipient IDs using findIndividualSendings()
  2. Call Inx_Api_Recipient_RecipientContext::findByIds($aRecipientIds) to manipulate these recipients
The following example demonstrates how to determine all recipients who opened the sent mail and set a date flag for these recipients:
 $oSendingHistoryManager = $oSession->getSendingHistoryManager();
 $oLastSending = $oSendingHistoryManager->findLastSendingForMailing( $iMailingId );
 $oIndividualSendings = $oLastSending->findIndividualSendings();

 $aRecipientIds = array();

 while( $oIndividualSendings->next() )
 {
   if( $oIndividualSendings->hasOpened() )
   {
     $aRecipientIds[] = $oIndividualSendings->getRecipientId();
   }
 }

 $oIndividualSendings->close();

 $oRecipientContext = $oSession->createRecipientContext();
 $oLastOpening = $oRecipientContext->getMetaData()->getUserAttribute( 'LastOpening' );
 $oRecipients = $oRecipientContext->findByIds( $aRecipientIds );

 $oNow = strtotime('now');

 while( $oRecipients->next() )
 {
   $oRecipients->updateDatetime( $oLastOpening, $oNow );
   $oRecipients->commitRowUpdate();
 }

 $oRecipients->close();
For more information on how to retrieve
  1. Sending
s, see the SendingHistoryManager documentation.

Located in /Api/Sending/Sending.php (line 103)

Inx_Api_ReadOnlyBusinessObject
   |
   --Inx_Api_Sending_Sending
Method Summary
Methods
findClicks (line 316)

Returns an Inx_Api_DataAccess_ClickDataRowSet containing all clicks on links in the mailing of this sending.

Returns an Inx_Api_DataAccess_ClickDataRowSet containing all clicks on links in the mailing of this sending. The returned row set contains data about the related clicks and is read only. The returned data can also contain attribute information about the recipients that performed these clicks.

  • return: A ClickDataRowSet containing clicks related to the sending of mails to individual recipients, including meta data of these recipients.
  • throws: Inx_Api_NullPointerException if no
  • access: public
  • Inx_Api_Recipient_RecipientContext $oRc: the
  • array $aAttrs: the Inx_Api_Recipient_Attributes which shall be fetched for later retrieval. Parameter may be null. Also see Inx_Api_Recipient_RecipientMetaData.
findGeneralMailing (line 244)

Returns the Inx_Api_GeneralMailing_GeneralMailing corresponding to this sending. returned if the mailing type of the sending is not compatible with Inx_Api_GeneralMailing_GeneralMailingManager or if the corresponding Inx_Api_GeneralMailing_GeneralMailing could not be found (e. method performs a separate server call.

Returns the Inx_Api_GeneralMailing_GeneralMailing corresponding to this sending. A null value is returned if the mailing type of the sending is not compatible with Inx_Api_GeneralMailing_GeneralMailingManager or if the corresponding Inx_Api_GeneralMailing_GeneralMailing could not be found (e.g. the object was deleted). Be aware that this method performs a separate server call.

  • return: the GeneralMailing of the sending, or null.
  • access: public
findIndividualSendings (line 259)

Returns an Inx_Api_Sending_IndividualSendingRowSet containing data related to the sending of mails to individual recipients. mail, clicked a link of the mail or caused a bounce and what the sending state is.

Returns an Inx_Api_Sending_IndividualSendingRowSet containing data related to the sending of mails to individual recipients. The Inx_Api_Sending_IndividualSendingRowSet can be used to determine whether a recipient opened the mail, clicked a link of the mail or caused a bounce and what the sending state is. Use this method if you are interested in the reaction of a couple of recipients and don't need to access their meta data. If you are only interested in the reaction of one or a few recipients use hasOpened($iRecipientId), hasClicked($iRecipientId) and hasBounced($iRecipientId). If you need to access recipient meta data (i.e. recipient column data and status), use findSendingRecipients($oRc, $aAttrs) instead.

  • return: An IndividualSendingRowSet containing data related to the sending of mails to individual recipients.
  • access: public
Inx_Api_Sending_IndividualSendingRowSet findIndividualSendings ()
findRecipients (line 302)

Returns an Inx_Api_Recipient_RecipientRowSet containing recipient meta data (i. status). that any recipients which are not existing anymore (with respect to their ID) are not included in the result.

Returns an Inx_Api_Recipient_RecipientRowSet containing recipient meta data (i.e. recipient column data and status). This row set allows the manipulation of recipients but contains no information on the sending. Be aware that any recipients which are not existing anymore (with respect to their ID) are not included in the result. Use this method if you are not interested in the reaction of the recipients or need to manipulate them. If you need to consider the reaction of the recipients, use findIndividualSendings()<i> or <i>findSendingRecipients($oRc, $aAttrs), depending on whether you need to access recipient meta data.
If you need to consider the reaction of the recipients and need to manipulate them, you have to do this in two stages:

  1. Collect the relevant recipient IDs using #findIndividualSendings()
  2. Call findByIds(int[]) to manipulate these recipients

  • return:
    1. RecipientRowSet
    containing recipient meta data (i.e. recipient column data and status).
  • throws: NullPointerException if no
  • access: public
A findRecipients (Inx_Api_Recipient_RecipientContext $oRc)
  • rc $oRc: the
    1. RecipientContext
    used to fetch the recipients.
findSendingRecipients (line 281)

Returns an Inx_Api_Sending_SendingRecipientRowSet containing data related to the sending of mails to individual recipients, including meta date of these recipients. determine whether a recipient opened the mail, clicked a link of the mail or caused a bounce and what the sending state is. access is read-only.

Returns an Inx_Api_Sending_SendingRecipientRowSet containing data related to the sending of mails to individual recipients, including meta date of these recipients. The Inx_Api_Sending_SendingRecipientRowSet can be used to determine whether a recipient opened the mail, clicked a link of the mail or caused a bounce and what the sending state is. It may also be used to access meta data (i.e. recipient column data and status) of the recipient. The access is read-only. Use this method if you are interested in the reaction of a couple of recipients and need access to their meta data. If you are only interested in the reaction of one or a few recipients use hasOpened($iRecipientId), hasClicked($iRecipientId) and hasBounced($iRecipientId). If you do not need to access recipient meta data (i.e. recipient column data and status), use findIndividualSendings() instead.
If you need to manipulate recipients use findRecipients($oRc) to get a fully featured Inx_Api_Recipient_RecipientRowSet. This row set contains no information on the sending though.

  • return: A SendingRecipientRowSet containing data related to the sending of mails to individual recipients, including meta date of these recipients.
  • throws: Inx_Api_NullPointerException if no
  • access: public
Inx_Api_Sending_SendingRecipientRowSet findSendingRecipients (Inx_Api_Recipient_RecipientContext $oRc, array $aAttrs)
getEndDate (line 137)

Returns the end date of this sending.

Returns the end date of this sending. This date corresponds to the end of the sending of the last mail.
The end date is returned as ISO-8601 formatted datetime string.

  • return: The end date of the sending.
  • access: public
string getEndDate ()
getListId (line 117)

Returns the ID of the list containing the mailing being sent.

Returns the ID of the list containing the mailing being sent.

  • return: The ID of the list containing the mailing being sent.
  • access: public
int getListId ()
getMailingId (line 110)

Returns the ID of the mailing being sent.

Returns the ID of the mailing being sent.

  • return: The ID of the mailing being sent.
  • access: public
int getMailingId ()
getModificationDate (line 160)

Returns the date when this sending has been modified last.

Returns the date when this sending has been modified last.
The modification date is returned as ISO-8601 formatted datetime string. The following events are considered as modifications:

  • The sending has been triggered (created)
  • The sending has been started
  • The sending has been ended
  • A mail of the sending has been sent to a recipient
  • A recipient of the sending opened the mail
  • A recipient of the sending clicked a link of the mail
  • A recipient of the sending caused a bounce
  • The mailing has been deleted
  • The sending protocol (individual sendings) has been deleted
This list is not concluding.

  • return: The date when this sending has been modified last.
  • access: public
string getModificationDate ()
getReportData (line 191)

Returns an Inx_Api_Sending_SendingReport object containing accumulated report data regarding this sending.

Returns an Inx_Api_Sending_SendingReport object containing accumulated report data regarding this sending. Be aware that this method performs a separate server call.

  • return: a SendingReport object containing accumulated report data regarding this sending.
  • since: API 1.11.5
  • access: public
getStartDate (line 128)

Returns the start date of this sending. which the first mail is being sent. sent.

Returns the start date of this sending. Please note, that this date does not specify the actual point in time at which the first mail is being sent. The mailing has to be prepared for each recipient before the first mail is sent.
The start date is returned as ISO-8601 formatted datetime string.

  • return: The start date of the sending.
  • access: public
string getStartDate ()
getState (line 167)

Returns the state of this sending.

Returns the state of this sending.

  • return: The state of this sending.
  • access: public
getTotalSize (line 181)

Returns the total size of the sending in bytes.

Returns the total size of the sending in bytes. This is the accumulation of the size of all sent mails.

  • return: The total size of the sending in bytes.
  • access: public
int getTotalSize ()
getType (line 174)

Returns the type of the mailing being sent.

Returns the type of the mailing being sent.

  • return: The type of the mailing being sent.
  • access: public
hasBounced (line 233)

Returns a bool indicating whether the specified recipient caused a bounce during the sending of the mail.

Returns a bool indicating whether the specified recipient caused a bounce during the sending of the mail.

  • return: true if the recipient caused a bounce during the sending of the mail, false otherwise.
  • access: public
bool hasBounced (int $iRecipientId)
  • int $iRecipientId: the ID of the recipient.
hasClicked (line 223)

Returns a bool indicating whether the specified recipient clicked a link of the mail sent by this sending.

Returns a bool indicating whether the specified recipient clicked a link of the mail sent by this sending.

  • return: true if the recipient clicked any link of the mail, false otherwise.
  • access: public
bool hasClicked (int $iRecipientId)
  • int $iRecipientId: the ID of the recipient.
hasOpened (line 214)

Returns a bool indicating whether the specified recipient opened the mail sent by this sending.

Returns a bool indicating whether the specified recipient opened the mail sent by this sending.

  • return: true if the recipient opened the mail, false otherwise.
  • access: public
bool hasOpened (int $iRecipientId)
  • int $iRecipientId: the ID of the recipient.
isMailingDeleted (line 206)

Returns a bool indicating whether the mailing sent by this sending has been deleted.

Returns a bool indicating whether the mailing sent by this sending has been deleted.

  • return: true if the mailing sent by this sending has been deleted, false otherwise.
  • access: public
bool isMailingDeleted ()
isProtocolDeleted (line 199)

Returns a bool indicating whether the protocol for this sending has been deleted. protocol has been deleted it is not possible to determine how a specific recipient reacted on the mail.

Returns a bool indicating whether the protocol for this sending has been deleted. After the protocol has been deleted it is not possible to determine how a specific recipient reacted on the mail.

  • return: true if the protocol has been deleted, false otherwise.
  • access: public
bool isProtocolDeleted ()

Inherited Methods

Inherited From Inx_Api_ReadOnlyBusinessObject

Inx_Api_ReadOnlyBusinessObject::getId()
Inx_Api_ReadOnlyBusinessObject::reload()

Documentation generated on Thu, 17 Sep 2015 14:27:30 +0200 by phpDocumentor 1.3.2