Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Method parameters

Allows to duplicate a message in MailUp.

Method parameters

  • int CloneMessage(string accessKey, string listId, string listGuid, int messageToCloneId, stringsubject)
    • accessKey: access key obtained using the Login method
    • listId: list identifier
    • listGuid: GUID of the list in MailUp 
    • messageToCloneId: ID of the message to be cloned
    • subject: subject of the cloned message. If null or empty, the subject will be the same as the original message


Parameters listGuid e listId can be used together or alternatively, passing one of them as null or empty: in the first case the list is verified using both parameters, otherwise using only the provided parameter.

...

CloneMessage method synchronously executes the following steps:

  1. Clonation Duplication of the data contained in the MailUp message
  2. Return ID of new message is returned to the caller of the message ID.


CloneMessage method asynchronously executes a copy of the files of the message to be cloned.

Note

Inconsistency: the response of CloneMessage method is different from many other MailUpSend methods because it does not include "errorCode" and "errorDescription" fields.

 

SOAP Examples

Code Block
languagehtml/xml
titleSOAP Request
firstline1
linenumberstrue
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
   <soap:Header/>
   <soap:Body>
      <ws:CloneMessage>
         <!--Use accessKey value that is returned by LoginFromId method-->
         <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9</ws:accessKey>
	 <ws:listId>7</ws:listId>
	 <ws:listGuid>94abaa1a-e215-4c3d-8a9c-5c66b802d</ws:listGuid>
         <ws:messageToCloneId>74</ws:messageToCloneId>
         <ws:subject>I'm a cloned message</ws:subject>         
      </ws:CloneMessage>
   </soap:Body>
</soap:Envelope>
Code Block
languagehtml/xml
titleSOAP Response (error case)
firstline1
linenumberstrue
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <CloneMessageResponse xmlns="http://services.mailupnet.it/WS">
         <CloneMessageResult>-1</CloneMessageResult>
      </CloneMessageResponse>
   </soap:Body>
</soap:Envelope>