Update Message From URL

Updates an existing Message with the specified URL.


Function

  • updateMessageFromURL()

Parameters

  • username: String
    • Account login name.
  • password: String
    • Account password.
  • message: Message
    • new message to replace existing message.
  • htmlContentURL: String
    • message content URL for html based viewing
  • textContentURL: String
    • message content URL for text viewing allowed.
  • mobileContentURL: String
    • message content URL for mobile viewing allowed.
  • headerId: int
    • content ID of header
  • footerId: int
    • content ID of footer

Return

  • int:
    • 1: success.
    • -1: failed.

Exception

  • Exception

Documentation

  • Sets and post-processes the specified content type to the contents of the specified URL and update an existing Message Object.
  • Fails if the MIME type returned by the URL doesn’t match the requested MIME type.

Examples

public void updateMessageFromURL() throws java.lang.Exception {

        Puresend p = new Puresend();
        PuresendPortType port = p.getPuresendHttpsSoap12Endpoint();

        String username = "XXX";
        String password = "XXX";

        String htmlContentURL = "https://sample/html/content";
        String textContentURL = "https://sample/text/content";
        String mobileContentURL = "https://sample/mobile/content";

        int messageId = 123;

        Integer headerId = 1234;
        Integer footerId = 1235;


        int result = port.updateMessage(username, password, messageId, htmlContentURL, textContentURL, mobileContentURL, headerId, footerId);

}    

<?php
include 'puresend.php';

$p = new Puresend();

$updateMessageData = new updateMessage();
$updateMessageData->username = 'XXX';
$updateMessageData->password = 'XXX';
$updateMessageData->htmlContentURL = "https://sample/html/content";
$updateMessageData->textContentURL = "https://sample/text/content";
$updateMessageData->mobileContentURL = "https://sample/mobile/content";
$updateMessageData->messageId = 123;
$updateMessageData->headerId = 1234;
$updateMessageData->footerId = 1235;

$response = $p->updateMessage($updateMessageData);
var_dump($response);

?>