Update Message
Updates an existing Message based on the Mime Type.
Function
updateMessage()
Parameters
- username:
String
- Account login name.
- password:
String
- Account password.
- message:
Message
- new message to replace existing message.
- mimeType:
String
- for the message version to be updated. Valid types are:
text/html
,text/plain
,text/x-html-mobile
- for the message version to be updated. Valid types are:
Return
int
:1
: success.-1
: failed.
Exception
- Exception
Documentation
- Updates an existing Message based on the Mime Type.
Examples
public void updateMessage() throws java.lang.Exception {
Puresend p = new Puresend();
PuresendPortType port = p.getPuresendHttpsSoap12Endpoint();
String username = "XXX";
String password = "XXX";
// a existing Message.
Message message = new Message();
message.setId(1234);
// set the message to new Category
message.setCategoryId(12);
String mimeType = "text/html";
Integer headerId = 1234;
Integer footerId = 1235;
int result = port.updateMessage(username, password, message, mimeType, headerId, footerId);
}
<?php
include 'puresend.php';
$p = new Puresend();
$updateMessageData = new updateMessage();
$updateMessageData->username = 'XXX';
$updateMessageData->password = 'XXX';
$messageInfoData = new Message();
$messageInfoData->id=1234;
$messageInfoData->categoryId = 12;
$updateMessageData->message = messageInfoData;
$updateMessageData->mimeType = "text/html";
$updateMessageData->headerId = 1234;
$updateMessageData->footerId = 1235;
$response = $p->updateMessage($updateMessageData);
var_dump($response);
?>