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

# Go

# Go Quickstart

Send your first email with the Mailofly Go SDK.

**Requires:** Go 1.22+ · [API key](api-keys.md) · [Account key](sending-accounts.md)

***

## 1. Install

```bash theme={null}
go get github.com/teamredevs/mailofly-go@latest
```

***

## 2. Send an email

```go theme={null}
package main

import (
	"fmt"
	"os"

	"github.com/teamredevs/mailofly-go"
)

func main() {
	client, err := mailofly.New(mailofly.Options{
		APIKey: os.Getenv("MAILOFLY_API_KEY"),
	})
	if err != nil {
		panic(err)
	}

	result, err := client.Emails.Send(map[string]any{
		"from":    "Acme <onboarding@example.com>",
		"to":      []string{"you@example.com"},
		"subject": "Hello from Mailofly",
		"html":    "<p>It works!</p>",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(result)
}
```

***

## 3. Check mail logs

```go theme={null}
client.MailLogs.List(&mailofly.MailLogsListOptions{Page: 1, PageSize: 10})
```

Or open **[Emails](https://www.mailofly.com/user/emails)** in the app.

***

## Next

* [Go SDK](../sdks/go.md) — full reference
* [Sending examples](sending-examples.md)
* [API: Emails](https://docs.mailofly.com/api/emails)


## Related topics

- [Introduction](/api/index.md)
- [Add domain](/getting-started/add-domain.md)
- [Http](/getting-started/http.md)
- [GoDaddy DNS Setup](/guides/domains/godaddy.md)
