Send Test Job to Emails.

Send a test job to the specified emails.


Function

  • sendTestJobToEmails()

Parameters

  • username: String
    • Account login name.
  • password: String
    • Account password.
  • jobId: int
    • The test Job ID.
  • toEmails: String[]
    • array of emails..

Return

  • int:
    • 1: success
    • 0: failed

Exception

  • Exception

Documentation

  • Send a test job to the specified emails.

Examples

public void sendTestJobToEmailsSample() {

        Puresend p = new Puresend();
        PuresendPortType port = p.getPuresendHttpsSoap12Endpoint();

        String username = "XXX";
        String password = "XXX";

        int jobId = 1234;
        List<String> toEmails = new ArrayList<>();
        toEmails.add("email1@domain.com");
        toEmails.add("email2@domain.com");

        int result = port.sendTestJobToEmails(username, password, jobId, toEmails);
}   

<?php

include 'puresend.php';

$p = new Puresend();

$sendTestJobToEmailsData = new sendTestJobToEmails();
$sendTestJobToEmailsData->username = 'XXX';
$sendTestJobToEmailsData->password = 'XXX';
$sendTestJobToEmailsData->jobId = 1234;
$sendTestJobToEmailsData->toEmails = 'email1@domain.com';

$response = $p->sendTestJobToEmails($sendTestJobToEmailsData);
var_dump($response);

?>