Skip to content

fabiustech/resend-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resend Go SDK

License: MIT Build Release

Installation

To install the Go SDK, simply execute the following command on a terminal:

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

Setup

First, you need to get an API key, which is available in the Resend Dashboard.

Example

import (
    "fmt"
    "github.com/resend/resend-go/v2"
)

func main() {
    apiKey := "re_123"

    client := resend.NewClient(apiKey)

    params := &resend.SendEmailRequest{
        To:      []string{"to@example", "you@example.com"},
        From:    "me@exemple.io",
        Text:    "hello world",
        Subject: "Hello from Golang",
        Cc:      []string{"cc@example.com"},
        Bcc:     []string{"cc@example.com"},
        ReplyTo: "replyto@example.com",
    }

    sent, err := client.Emails.Send(params)
    if err != nil {
        panic(err)
    }
    fmt.Println(sent.Id)
}

You can view all the examples in the examples folder

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.7%
  • Dockerfile 0.3%