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

# Java

> Send emails from Java using the SendKit SDK.

<CardGroup cols={2}>
  <Card title="Source Code" icon="github" href="https://github.com/sendkitdev/sendkit-java">
    View on GitHub
  </Card>

  <Card title="Package" icon="box" href="https://central.sonatype.com/artifact/dev.sendkit/sendkit">
    View on Maven Central
  </Card>
</CardGroup>

## Install

<CodeGroup>
  ```xml Maven theme={null}
  <dependency>
      <groupId>dev.sendkit</groupId>
      <artifactId>sendkit</artifactId>
      <version>1.0.0</version>
  </dependency>
  ```

  ```groovy Gradle theme={null}
  implementation 'dev.sendkit:sendkit:1.0.0'
  ```
</CodeGroup>

## Send email

```java theme={null}
import dev.sendkit.SendKit;
import dev.sendkit.Emails;
import java.util.List;

SendKit client = new SendKit("sk_your_api_key");

Emails.SendEmailResponse response = client.emails().send(
    new Emails.SendEmailParams(
        "Your Name <you@yourdomain.com>",
        List.of("recipient@example.com"),
        "Hello from SendKit"
    ).html("<h1>Welcome!</h1><p>Your first email with SendKit.</p>")
);

System.out.println("Email sent: " + response.getId());
```
