> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paubox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install the Paubox PHP SDK and send your first HIPAA-compliant email in minutes.

<Steps>
  <Step title="Install the SDK">
    Add the SDK to your project with Composer:

    ```bash theme={null}
    composer require paubox/paubox-php
    ```
  </Step>

  <Step title="Set your credentials">
    Create a `.env` file in your project root:

    ```bash theme={null}
    PAUBOX_API_KEY=YOUR_API_KEY
    PAUBOX_API_USER=YOUR_USERNAME
    ```

    The SDK loads these values automatically. To obtain credentials, see [Authentication](/php-sdk/authentication).
  </Step>

  <Step title="Send your first email">
    Create a file `send.php`:

    ```php theme={null}
    <?php
    require_once __DIR__ . '/vendor/autoload.php';

    $paubox  = new Paubox\Paubox();
    $message = new Paubox\Mail\Message();

    $header = new Paubox\Mail\Header();
    $header->setSubject("Your first Paubox email");
    $header->setFrom("sender@yourdomain.com");

    $content = new Paubox\Mail\Content();
    $content->setPlainText("This message was sent with the Paubox PHP SDK.");

    $message->setHeader($header);
    $message->setContent($content);
    $message->setRecipients(["recipient@example.com"]);

    $response = $paubox->sendMessage($message);

    echo "Sent. Tracking ID: " . $response->sourceTrackingId . PHP_EOL;
    ```

    Run it:

    ```bash theme={null}
    php send.php
    ```

    ```
    Sent. Tracking ID: abc123-def456-...
    ```
  </Step>

  <Step title="Check delivery status">
    Use the tracking ID to check delivery:

    ```php theme={null}
    $disposition = $paubox->getEmailDisposition($response->sourceTrackingId);

    foreach ($disposition->data->message->message_deliveries as $delivery) {
        echo $delivery->recipient . " → " . $delivery->status->deliveryStatus . PHP_EOL;
    }
    ```

    ```
    recipient@example.com → delivered
    ```
  </Step>
</Steps>

## Next steps

* [Email client](/php-sdk/email-client): add HTML, attachments, CC/BCC, and handle errors
* [Forms client](/php-sdk/forms-client): retrieve form schemas and submit responses
