inwise Top Background
Arrow on Service

SendEmail

Operation Name: operation Name
Description: description

All actions require a valid user name and password using authenticaion header.

Service url : https://www.em-sender.com/ws/inwiseservice.asmx

Adding a reference to inwise web services

User Name:
Password:  
  • Select source:
  • Select target:
The service enables you to send an email message (new or existing) to a single recipient (new or existing)

Parameters:

The service returns the SendingResult

Java Code:

    //// call the service
    SendingResult sendResult = soapService.send(source, target);

    //// check the results
    if (sendResult.isIsSuccess()) {
        String sendId = sendResult.getIds().getString().get(0);
        return "Transaction Id: " + sendId;
    } else {
        ErrorDetails errorDetails = sendResult.getErrorDetails();
        return Utils.BuildErrorMessage(errorDetails);
    }

C# Code:

    //// use the new service url

    InwiseService.InwiseService service = new InwiseService.InwiseService();

    service.Url = logonResult.ServiceUrl;

 

    //// prepare headers

    service.SessionIdHeaderValue = new SessionIdHeader()

    {

        SessionId = logonResult.SessionId

    };

 

    //// call the service

    SendingResult sendResult = service.Send(source, target);

 

    //// check the results

    if (sendResult.IsSuccess)

    {

        String sendId = sendResult.Ids[0];

        return "Transaction Id: " + sendId;

    }

    else

    {

        ErrorDetails errorDetails = sendResult.ErrorDetails;

        return Utils.BuildErrorMessage(errorDetails);

    }

VB Code:

                '' use the new service url

                Dim service As New InwiseService.InwiseService()

                service.Url = logonResult.ServiceUrl

 

                '' prepare headers

                service.SessionIdHeaderValue = New SessionIdHeader() With { _

                 .SessionId = logonResult.SessionId _

                }

 

                '' call the service

                Dim sendResult As SendingResult = service.Send(source, target)

 

                '' check the results

                If sendResult.IsSuccess Then

                    Dim sendId As [String] = sendResult.Ids(0)

                    Return "Transaction Id: " & sendId

                Else

                    Dim errorDetails As ErrorDetails = sendResult.ErrorDetails

                    Return Utils.BuildErrorMessage(errorDetails)

                End If

Raw Xml:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <soap:Header>

        <SessionIdHeader xmlns="http://www.inwise.com/webservices/v2">

            <SessionId>ef7b1728ce004a4dbd7404d16918dd53</SessionId>

            <EndSession>true</EndSession>

        </SessionIdHeader>

    </soap:Header>

    <soap:Body>

        <Send xmlns="http://www.inwise.com/webservices/v2">

            <source xsi:type="ExistingSendingSource">

                <ChannelType>Email</ChannelType>

                <Id>1</Id>

            </source>

            <target xsi:type="TestSendingTarget">

                <Targets><string>email1@company.com</string><string> email2@company.com</string></Targets>

            </target>

        </Send>

    </soap:Body>

</soap:Envelope>


Response

    <SendResponse xmlns="http://www.inwise.com/webservices/v2">
      <SendResult>
        <IsSuccess>true</IsSuccess>
        <ErrorDetails>
          <Code>Success</Code>
        </ErrorDetails>
        <Ids>
          <string>ab0b9540-87b4-42e6-8ebc-80139e0379d9</string>
          <string>c1d10e74-4e16-42dc-bc4a-879e80b59afc</string>
        </Ids>
        <Targets>
          <string>email1@company.com</string>
          <string>email2@company.com</string>
        </Targets>
        <SendStatus>
          <string>Sent</string>
          <string>Sent</string>
        </SendStatus>
      </SendResult>
    </SendResponse>
    



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.