> ## 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 Rust SDK and send your first HIPAA-compliant email in minutes.

<Steps>
  <Step title="Add the dependency">
    Add `paubox` and `tokio` to your `Cargo.toml`:

    ```toml theme={null}
    [dependencies]
    paubox = "0.1"
    tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
    ```
  </Step>

  <Step title="Set your credentials">
    Export your API key and username as environment variables:

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

    To obtain credentials, see [Authentication](/rust-sdk/authentication).
  </Step>

  <Step title="Send your first email">
    Create `src/main.rs`:

    ```rust theme={null}
    use paubox::{Message, PauboxClient};

    #[tokio::main]
    async fn main() -> Result<(), Box<dyn std::error::Error>> {
        let client = PauboxClient::from_env()?;

        let message = Message::builder()
            .from("sender@yourdomain.com")
            .to(["recipient@example.com"])
            .subject("Your first Paubox email")
            .text_content("This message was sent with the Paubox Rust SDK.")
            .build()?;

        let response = client.send_message(&message).await?;

        println!("Sent. Tracking ID: {}", response.source_tracking_id);

        Ok(())
    }
    ```

    Run it:

    ```bash theme={null}
    cargo run
    ```

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

  <Step title="Check delivery status">
    ```rust theme={null}
    let disposition = client
        .get_email_disposition(&response.source_tracking_id)
        .await?;

    for delivery in &disposition.message_deliveries {
        println!("{} → {}", delivery.recipient, delivery.delivery_status);
    }
    ```

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

## Next steps

* [Email client](/rust-sdk/email-client): attachments, CC/BCC, error handling
* [Forms client](/rust-sdk/forms-client): retrieve form schemas and submit responses
