Docs
Quickstarts

Send with Go

Use the official Go module.

1. Install

go get github.com/resend/resend-go/v2

2. Point the SDK at Postwave

RESEND_BASE_URL=https://post-waves.com/

3. Send an email

package main

import (
	"fmt"
	"os"

	"github.com/resend/resend-go/v2"
)

func main() {
	client := resend.NewClient(os.Getenv("API_KEY"))
	sent, err := client.Emails.Send(&resend.SendEmailRequest{
		From:    "Acme <onboarding@yourdomain.com>",
		To:      []string{"delivered@postwave.test"},
		Subject: "Hello world",
		Html:    "<strong>It works!</strong>",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(sent.Id)
}

4. Run it

API_KEY=pw_xxxxxxxxx go run .

You'll get back { "id": "…" }. Open Emails in the dashboard to see it arrive and its delivery status update.

Tip: delivered@postwave.test is a test address: it simulates a delivery without emailing anyone. Swap in a real address when you're ready.

Was this page helpful?Send feedback