1

I'm facing the problem with Fuel SDK integration with Java - I can't understand how to send the newly created email.

In this article I see how to perform similar operation using Php:

$response = new ET_Post($myclient, 'Send', array("List"=> array("ID" => "YOUR_LIST_ID_GOES_HERE"), "Email" => array("CustomerKey" => "123")));

But I don't see similar object ET_Post in Java SDK. How can I trigger the email sending?

1 Answer 1

2

There's an example of doing a User-Initiated Send on this page: Creating a Send Object

Here's a snip from the Java section:

public void testSendEmailToList() throws RemoteException {

    Soap stub = init();
    Send send = new Send();
    send.setEmail(testGetEmailById());
    List l1= new List();
    l1.setID(new Integer(12345));
    List l2= new List();
    l2.setID(new Integer(54321));
    List[] ids = {l1,l2};
    send.setList(ids);

    send.setFromAddress("[email protected]");
    send.setFromName("Angel Cruz");

    APIObject[] apiObjectList = {send};
    CreateRequest createRequest = new CreateRequest(new CreateOptions(), apiObjectList);
    CreateResponse createResponse = stub.create(createRequest);
    System.out.println("CreateResponse ::: " + createResponse.getOverallStatus());

}
2
  • ok, thanks, but as far as I see, it's not the Fuel SDK, but using SOAP API via Java?
    – bsiamionau
    Commented Aug 3, 2016 at 14:24
  • The Fuel SDK is just a wrapper around the core SOAP and REST API operations. Commented Aug 3, 2016 at 14:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .