Skip to main content

Install

go get github.com/sendkitdev/sendkit-go

Send email

package main

import (
    "context"
    "fmt"
    sendkit "github.com/sendkitdev/sendkit-go"
)

func main() {
    client, _ := sendkit.NewClient("sk_your_api_key")

    resp, _ := client.Emails.Send(context.Background(), &sendkit.SendEmailParams{
        From:    "Your Name <you@yourdomain.com>",
        To:      []string{"recipient@example.com"},
        Subject: "Hello from SendKit",
        HTML:    "<h1>Welcome!</h1><p>Your first email with SendKit.</p>",
    })

    fmt.Println("Email sent:", resp.ID)
}