All Products
Search
Document Center

Direct Mail:Send data information

更新时间:Sep 01, 2022

Obtains the data sent under specified conditions.

 public void testSenderStatisticsByTagNameAndBatchID() {
        IAcsClient client = IAcsClientUtil.getiAcsClient();
        SenderStatisticsByTagNameAndBatchIDRequest request = new SenderStatisticsByTagNameAndBatchIDRequest();
        try {
            request.setAccountName("test***@example.net");
            request.setTagName("testtag");
            request.setStartTime("2018-07-31");
            request.setEndTime("2018-08-05");
            SenderStatisticsByTagNameAndBatchIDResponse httpResponse = client.getAcsResponse(request);
            System.out.println("------testSenderStatisticsByTagNameAndBatchID------" + JSON.toJSONString(httpResponse));
        } catch (ServerException e) {
            e.printStackTrace();
        } catch (ClientException e) {
            e.printStackTrace();
        }
    }

Recipient Tracking Obtains Sending Data under Specified Conditions

public void testGetTrackListByMailFromAndTagName() {
        //If you are not in the China (Hangzhou) region, replace cn-hangzhou in the following code with your region ID. For example, if you are in the Singapore (Singapore) or Australia (Sydney) region, specify ap-southeast-1 or ap-southeast-2. 
        IAcsClient client = IAcsClientUtil.getiAcsClient();
        GetTrackListByMailFromAndTagNameRequest request = new GetTrackListByMailFromAndTagNameRequest();
        try {
            request.setAccountName("test***@example.net");
            request.setTagName("testtag");
            request.setStartTime("2018-09-22");
            request.setEndTime("2018-10-03");
            GetTrackListByMailFromAndTagNameResponse httpResponse = client.getAcsResponse(request);
            System.out.println("------getTrackListByMailFromAndTagName------" + JSON.toJSONString(httpResponse));
        } catch (ServerException e) {
            e.printStackTrace();
        }
        catch (ClientException e) {
            e.printStackTrace();
        }
    }