# Introduction

Use Lettermint to send transactional and broadcast email, receive inbound email, and manage email infrastructure through APIs, SDKs, or SMTP.

## Choose an interface

<CardGroup cols={2}>
    <Card title="SDKs and frameworks" icon="code" href="/sdks">
        Send email or manage team resources with an official package.
    </Card>
    <Card title="SMTP" icon="server" href="/guides/send-email-with-smtp">
        Send from applications and devices that support SMTP.
    </Card>
    <Card title="Inbound mail" icon="inbox" href="/platform/inbound-mail/introduction">
        Receive parsed email through signed webhooks.
    </Card>
    <Card title="Team API" icon="settings" href="/platform/teams/team-api/introduction">
        Manage domains, projects, routes, webhooks, and suppressions.
    </Card>
</CardGroup>

## Send your first email

Complete these steps before you run an example:

<Stepper>

1. **Create your account**

   Sign up at [app.lettermint.co](https://app.lettermint.co/register).

2. **Create a Project API token**

   Create a project, then create a token and store it in `LETTERMINT_PROJECT_TOKEN`.

3. **Send your first email**

   Install an [official SDK](/sdks), or use cURL.

</Stepper>

:::warning
Never expose Project API tokens or Team API tokens in client-side code or public repositories.
:::

:::info
Every project can have multiple Project API tokens. Create one token per app, worker, or environment so you can rotate credentials independently.
:::

<CodeTabs syncKey="lettermint-language">

```typescript title="Node.js"
import { Lettermint } from "lettermint";

const lettermint = new Lettermint({
  sendingToken: process.env.LETTERMINT_PROJECT_TOKEN!,
});

const response = await lettermint.emails.send({
  from: "Bob <bob@lettermint.co>",
  to: ["ok@lettermint.dev"],
  subject: "Hello world!",
  text: "This is my first ever email sent via Lettermint.",
});
```

```php title="PHP"
<?php

require __DIR__ . '/vendor/autoload.php';

use Lettermint\Lettermint;

$lettermint = new Lettermint(sendingToken: getenv('LETTERMINT_PROJECT_TOKEN'));

$response = $lettermint->emails->send([
    'from' => 'Bob <bob@lettermint.co>',
    'to' => ['ok@lettermint.dev'],
    'subject' => 'Hello world!',
    'text' => 'This is my first email sent via Lettermint.',
]);
```

```python title="Python"
import os
from lettermint import Lettermint

lettermint = Lettermint(sending_token=os.environ["LETTERMINT_PROJECT_TOKEN"])

response = lettermint.emails.send({
    "from": "Bob <bob@lettermint.co>",
    "to": ["ok@lettermint.dev"],
    "subject": "Hello world!",
    "text": "This is my first email sent via Lettermint.",
})
```

```go title="Go"
package main

import (
	"context"
	"log"
	"os"

	lettermint "github.com/lettermint/lettermint-go/v3"
)

func main() {
	client, err := lettermint.New(lettermint.WithSendingToken(os.Getenv("LETTERMINT_PROJECT_TOKEN")))
	if err != nil {
		log.Fatal(err)
	}

	_, err = client.Emails.Compose().
		From("Bob <bob@lettermint.co>").
		To("ok@lettermint.dev").
		Subject("Hello world!").
		Text("This is my first email sent via Lettermint.").
		Send(context.Background())
	if err != nil {
		log.Fatal(err)
	}
}
```

```java title="Java"
import co.lettermint.Lettermint;

public class SendEmail {
    public static void main(String[] args) {
        Lettermint lettermint = Lettermint.builder()
            .sendingToken(System.getenv("LETTERMINT_PROJECT_TOKEN"))
            .build();

        lettermint.emails().compose()
            .from("Bob <bob@lettermint.co>")
            .to("ok@lettermint.dev")
            .subject("Hello world!")
            .text("This is my first email sent via Lettermint.")
            .send();
    }
}
```

```bash title="cURL"
curl -X "POST" "https://api.lettermint.co/v1/send" \
     -H 'Content-Type: application/json' \
     -H "x-lettermint-token: $LETTERMINT_PROJECT_TOKEN" \
     -H 'Accept: application/json' \
     -d $'{
  "text": "This is my first email sent via Lettermint.",
  "subject": "Hello world!",
  "to": [
    "ok@lettermint.dev"
  ],
  "from": "Bob <bob@lettermint.co>"
}'
```

</CodeTabs>

## Next steps

<CardGroup cols={3}>
    <Card title="Quickstart" icon="rocket" href="/quickstart">
        Create a token and send your first email
    </Card>
    <Card title="API reference" icon="book" href="/api-reference/sending">
        Review Sending API endpoints
    </Card>
    <Card title="Integrations" icon="code" href="/sdks">
        Find SDKs, frameworks, and platform integrations
    </Card>
    <Card title="Production checklist" icon="list-check" href="/production-checklist">
        Prepare your integration for production
    </Card>
</CardGroup>
