Creating a Message

Creates a Content Message for use in a job


Function

  • createMessage()

Parameters

  • username: String
    • Account login name.
  • password: String
    • Account password.
  • name: String
    • name of content message.
  • categoryId: int
    • category to create Message in.
    • -1 for default top level category.
  • htmlContent: String
    • message content for html based viewing
  • textContent: String
    • message content for text viewing allowed.
  • mobileContent: String
    • message content for mobile viewing allowed.
  • headerId: int
    • content ID of header
  • footerId: int
    • content ID of footer

Return

  • int:
    • message ID: the newly created message id

Exception

  • Exception

Documentation

  • Creates a Content Message for use in a job.

Examples

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

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

        String username = "XXX";
        String password = "XXX";
        String contentName = "Content Name";
        int categoryId = -1;
        String htmlContent = "htmlContent sample";
        String textContent = "textContent sample";
        String mobileContent = "mobileContent sample";
        int headerId = 123;
        int footerId = 234;

        port.createMessage(username, password, contentName, categoryId, htmlContent, textContent, mobileContent, headerId, footerId);

}    

<?php
include 'puresend.php';

$p = new Puresend();

$createMessageData = new createMessage();
$createMessageData->username = 'XXX';
$createMessageData->password = 'XXX';
$createMessageData->categoryId = -1;
$createMessageData->htmlContent = "htmlContent sample";
$createMessageData->textContent = "textContent sample";
$createMessageData->mobileContent = "mobileContent sample";
$createMessageData->headerId = 123;
$createMessageData->footerId = 234;

$response = $p->createMessage($createMessageData);
var_dump($response);

?>