inwise - email marketing and newsletter software company
 
inwise Top Background
Arrow on Service

Messages Create New Message
Footer

Messages Create New Message

Operation Name: operation Name
Description: description

All actions require a valid user name and password using authenticaion header.
Show a raw xml example including the authentication header.

Service url:https://api.inwise.com/InwiseWebServices.asmx

Adding a reference to inwise web services

User Name:
Password:  
InwiseMessage msg object with the following details:
Internal Name:
Subject:
Body:
MsgToName:
ReplyTo:
SenderName:
From:
MessageType:
CharSet:
AttachmentFileName:
AttachmentFileData:
The service enables you to create a new message for later use.
The operation returns the send id of the new message.

Parameters:

An InwiseMessage object with the following fields:
  • String Name
    The display name for the message. This field must be set, and the name must be unique.
  • String Subject
    The subject line of the message. This fiels must be set.
  • String Body
    The body of the message. This fiels must be set.
  • String MessageType
    The type of the message.
    Allowed values are "html" or "text".
    You can leave this field empty or null, in that case the default value defined in out systems will be used.
  • String ReplyTo
    The reply to address. This field can be left empty and the default value in our system will be used. If you do set this field make sure it is a valid email address.
  • String SenderName
    The name of the sender. This field is optional.
  • String MsgToName
    The name of the recipient. This field can be left empty.
  • String FolderId
    The messages folder id in which the message will be displayed. This field is optional and if you leave it empty the message will show on the default messages folder on.
  • String AttachmentFileName
    The name of an attachment. This field is optional and is used only if you want to attach a file to your message.
  • Array of bytes AttachmentFileData
    If you wish to attach a file to your message, you need to set this field with the binary data of the attachment file.

Java Code:

//get a reference to the service InwiseWebServices ws = new InwiseWebServices();
InwiseWebServicesSoap inwiseWebServicesSoap = ws.getInwiseWebServicesSoap();

//fill the security header
HeaderHandler hh = new HeaderHandler("myusername", "myPassword");
hh.setHeader(inwiseWebServicesSoap);


inwise.InwiseMessage msg = new inwise.InwiseMessage();

//the message display name - for internal use
msg.setName("message #1");

//the message subject
msg.setSubject( "message subject");

//the message type
msg.setMessageType( "html");

//the message charset
msg.setCharSet( "utf-8");

//the reply to address
msg.setReplyTo( "replies@company.com");

//the sender name
msg.setSenderName( "Tal Giladi");

//the recipient's name
msg.setMsgToName( "#field1#");

//the messages folder id
msg.setFolderId( "8");

//the message body
msg.setBody( "message body");
//call the operation
int sendid = inwiseWebServicesSoap.messagesCreateNewMessage(msg);

C# Code:

 //get a reference to the service

        InwiseWebServices.InwiseWebServices ws = new InwiseWebServices.InwiseWebServices();

 

        //fill the security header

        InwiseWebServices.SecHeader header = new InwiseWebServices.SecHeader();

        header.username = "username";

        header.pass = "myPassword";

        ws.SecHeaderValue = header;//set credentials

 

        InwiseWebServices.InwiseMessage msg = new InwiseWebServices.InwiseMessage();

 

        //the message display name - for internal use

        msg.Name = "message #1";

 

        //the message subject

        msg.Subject = "message subject";

 

        //the message type

        msg.MessageType = "html";

 

        //the message charset

        msg.CharSet = "utf-8";

 

        //the reply to address

        msg.ReplyTo = "replies@company.com";

 

        //the sender name

        msg.SenderName = "Tal Giladi";

 

        //the recipient's name

        msg.MsgToName = "#field1#";

 

        //the messages folder id

        msg.FolderId = "8";

 

        //the message body

        msg.Body = "message body";

        //call the operation

        int sendid = ws.Messages_CreateNewMessage(msg);

VB Code:

 'get a reference to the service

        Dim ws As InwiseWebServices.InwiseWebServices = New InwiseWebServices.InwiseWebServices()

 

        'fill the security header

        Dim header As InwiseWebServices.SecHeader = New InwiseWebServices.SecHeader()

        header.username = "username"

        header.pass = "myPassword"

        ws.SecHeaderValue = header 'set credentials

 

        Dim msg As InwiseWebServices.InwiseMessage = New InwiseWebServices.InwiseMessage()

 

        'the message display name - for internal use

        msg.Name = "message #1"

 

        'the message subject

        msg.Subject = "message subject"

 

        'the message type

        msg.MessageType = "html"

 

        'the message charset

        msg.CharSet = "utf-8"

 

        'the reply to address

        msg.ReplyTo = "replies@company.com"

 

        'the sender name

        msg.SenderName = "Tal Giladi"

 

        'the recipient's name

        msg.MsgToName = "#field1#"

 

        'the messages folder id

        msg.FolderId = "8"

 

        'the message body

        msg.Body = "message body"

        'call the operation

        Dim sendid As Integer = ws.Messages_CreateNewMessage(msg)




Home  |  About us  |  Products  |  Service  |  Partners  |  Forum  |  Email Marketing Terms  |  Support  |  Contact us
Terms & Conditions  |  Privacy Policy  |  Anti Spam Policy  |  Site Map
© 2008 inwise LTD. All rights reserved.