Create domain throttles Job
Create Job by domain throttles. You can then update this draft job with the necessary information.
Function
createDomainThrottlesJob()
Parameters
- username:
String
- Account login name.
- password:
String
- Account password.
- categoryId:
Integer
- Category to create job in.
-1
for default top level category.
- jobName:
String
- Job name. Must be a unique name.
- Job jobInfo:
Job
- the Job object that contains the updated data
Return
List<Integer>
:Job Id array.
Exception
- Exception
Documentation
- Create Job by domain throttles. You can then update this draft job with the necessary information.
Examples
public void createDomainThrottlesJobSample() {
try {
Puresend p = new Puresend();
PuresendPortType port = p.getPuresendHttpsSoap12Endpoint();
String username = "XXX";
String password = "XXX";
Job job = new Job();
ObjectFactory factory = new ObjectFactory();
job.setName(factory.createJobName("TestSampleName"));
job.getDomainThrottles().add("gmail.com,40,5,20,5,0");
job.getDomainThrottles().add("yahoo.com,40,5,20,5,0");
job.setRulesetId(1177);
job.setFrom(factory.createJobFrom("aaa@aaa.com"));
job.getListIds().add(9006);
job.setMessageId(17253);
job.setSubject(factory.createJobSubject("a subject"));
job.getClusterNames().add("sampleCluster");
port.createDomainThrottlesJob(username, password, "TestSample", -1, job);
}
} catch (Exception e) {
System.out.println("An unexpected error has occurred." + e.getMessage());
}
}
<?php
include 'puresend.php';
$p = new Puresend();
$createDomainThrottlesJobData = new createDomainThrottlesJob();
$createDomainThrottlesJobData->username = 'XXX';
$createDomainThrottlesJobData->password = 'XXX';
$createDomainThrottlesJobData->jobName = 'TestSampleName';
$createDomainThrottlesJobData->categoryId = -1;
$jobInfoData = new Job();
$jobInfoData->name = 'TestPhp';
$jobInfoData->rulesetId = 1177;
$jobInfoData->from = 'aaa@aaa.com';
$jobInfoData->messageId = 17253;
$jobInfoData->subject = 'Test subject';
$jobInfoData->clusterNames = 'sampleCluster';
$jobInfoData->domainThrottles = "gmail.com,40,5,20,5,0";
$jobInfoData->listIds = 9006;
$createDomainThrottlesJobData->jobInfo = $jobInfoData;
$response = $p->createDomainThrottlesJob($createDomainThrottlesJobData);
var_dump($response);
?>