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

Sending Send Individual New Message
Footer

Sending Send Individual 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:  
Email: 
Recipient id: 
Subject: 
Body: 
MsgToName: 
ReplyTo: 
SenderName: 
From: 
SendId: 
MessageType: 
Charset: 
AttachmentFileName: 
#Field1# value: 
The service enables you to send an immediate email message to one email address.
The service returns the transaction Id.
  • This sending method does not remove unsubscribed/bounced emails and it is your responsibility to send to a valid address only.
  • For a more efficient usage, you can open 2 threads in your code when calling this service.
  • You can also use our one time login service for a quicker response time.
  • If you wish to embed personal links for each message you send, please follow the steps:
    • Ask the support to activate the feature of embedding the original link on links control.
    • Using links in the format 'domain.com?param=field1', when the value of field1 you should supply to the service, and the service will use it to replace the appropriate fields.
    This is the only way to use personal links that include tracking, as there is a limit on the number of new links you can use each month.

Parameters:

  • String TransactionId
    The transaction Id, this value can be used for tracking and future queries with inwise.
  • String email
    The email address to which the message will be sent.
    This field must be set.
    The address must a valid email.
  • Array CustomFieldValue
    An array with custom fields to be replaced in the message body. If the message you want to send contains custom fields, you can pass the relevant values for each recipients here. This field is optional.
An object of InwiseMessage with the following fields :
  • String Body
    The body of the message. Can not be null or empty.
  • String CharSet
    The charset for sending the email.
    This must be a valid charset value or be left empty, in that case, the default value defined in our systems will be used.
    * Note that if MessageType is text then CharSet value will be ignored.
  • String From
    The email address of the sender. This field must be set, and must be a valid email address.
  • String Subject
    The subject of the message. This field 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 must be set and must be a valid email address.
  • String SenderName
    The name of the sender. This field is optional.
  • int SendId
    Some unique send id for tracking the message and feedback actions. Make sure you do not select a value you have used before.
  • String MsgToName
    The name of the recipient. This field can be left empty.

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);


//create a new instance of InwiseMessage
inwise.InwiseMessage msg = new inwise.InwiseMessage();

//now set the message fields

//the message body
msg.setBody("<h2>message body</h2>");

//the message charset
msg.setCharSet( "utf-8");//this must be legall charset

//the from address
msg.setFrom( "myCompany@company.com");

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

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

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

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

//the send id for tracking the message
msg.setSendId(388);//You need to save this value for future queries


//the recipient id, this number is for your own tracking use only and not a real id from our system
int recipientid = 343;

//the email address
String email = "email@email.com";

//custom fields to be replaced in the message
inwise.ArrayOfCustomFieldValue fields = new ArrayOfCustomFieldValue();
fields.customFieldValue = new ArrayList<CustomFieldValue>();

CustomFieldValue field1 = new CustomFieldValue();//string field
field1.setLocalName("field1");
field1.setFieldValue("my first name");
fields.customFieldValue.add(field1);

CustomFieldValue field23 = new CustomFieldValue();//date field
field23.setLocalName("field23");
field23.setFieldValue(new Date());
fields.customFieldValue.add(field23);

CustomFieldValue field28 = new CustomFieldValue();//int field
field28.setLocalName("field28");
field28.setFieldValue(30);
fields.customFieldValue.add(field28);
//call the operation
String transactionId = inwiseWebServicesSoap.sendingSendIndividualNewMessage( msg, recipientid, email,fields);

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

 

        //create a new instance of InwiseMessage

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

 

        //now set the message fields

 

        //the message body

        msg.Body = "<h2>message body</h2>";

 

        //the message charset

        msg.CharSet = "utf-8";//this must be legall charset

 

        //the from address

        msg.From = "myCompany@company.com";

 

        //the message subject

        msg.Subject = "message subject";

 

        //the message type

        msg.MessageType = "html";

 

        //the reply to address

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

 

        //the sender name

        msg.SenderName = "Tal Giladi";

 

        //the send id for tracking the message

        msg.SendId = 388;//You need to save this value for future queries

 

 

        //the recipient id, this number is for your own tracking use only and not a real id from our system

        int recipientid = 343;

 

        //the email address

        string email = "email@email.com";

 

        //custom fields to be replaced in the message

        InwiseWebServices.CustomFieldValue[] fields = new InwiseWebServices.CustomFieldValue[2];

        fields[0] = new InwiseWebServices.CustomFieldValue();

        fields[0].LocalName = "field1";

        fields[0].FieldValue = "Tal Giladi";

 

        fields[1] = new InwiseWebServices.CustomFieldValue();

        fields[1].LocalName = "field28";

        fields[1].FieldValue = 30;

 

        //call the operation

        string transactionId = ws.Sending_SendIndividualNewMessage( msg, recipientid, email, fields);

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

 

        'create a new instance of InwiseMessage

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

 

        'now set the message fields

 

        'the message body

        msg.Body = "message body>"

 

        'the message charset

        msg.CharSet = "utf-8" 'this must be legall charset

 

        'the from address

        msg.From = "myCompany@company.com"

 

        'the message subject

        msg.Subject = "message subject"

 

        'the message type

        msg.MessageType = "html"

 

        'the reply to address

        msg.ReplyTo = "replies@company.com"

 

        'the sender name

        msg.SenderName = "Tal Giladi"

 

        'the send id for tracking the message

        msg.SendId = 388 'You need to save this value for future queries

 

 

        'the recipient id, this number is for your own tracking use only and not a real id from our system

        Dim recipientid As Integer = 343

 

        'the email address

        Dim email As String = "email@email.com"

 

        'custom fields to be replaced in the message

        Dim fields() As InwiseWebServices.CustomFieldValue = New InwiseWebServices.CustomFieldValue(2) {}

        fields(0) = New InwiseWebServices.CustomFieldValue()

        fields(0).LocalName = "field1"

        fields(0).FieldValue = "Tal Giladi"

 

        fields(1) = New InwiseWebServices.CustomFieldValue()

        fields(1).LocalName = "field28"

        fields(1).FieldValue = 30

 

        'call the operation

        Dim transactionId As String = ws.Sending_SendIndividualNewMessage(msg, recipientid, email, fields)




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.