For the complete site index, see llms.txt. Docs index: llms-docs.txt. Marketing corpus: llms-full.txt. Docs corpus: llms-full-docs.txt. Prefer markdown URLs where available (append .md).. Product skill: skill.md. Pricing: pricing.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

[Go SDK]

Gin

High-throughput Gin handlers that send email via the Go SDK with context-aware requests.

1

Install the Go package

bash
go get github.com/reloop-labs/reloop-email
2

Send email from Gin

send_email.go
1package main
2
3import (
4 "net/http"
5 "os"
6
7 "github.com/gin-gonic/gin"
8 reloopemail "github.com/reloop-labs/reloop-email"
9)
10
11func main() {
12 reloop, _ := reloopemail.NewClient(reloopemail.ClientOptions{
13 APIKey: os.Getenv("RELOOP_API_KEY"),
14 })
15
16 r := gin.Default()
17 r.POST("/send", func(c *gin.Context) {
18 email, err := reloop.Emails().Send(c.Request.Context(), &reloopemail.SendEmailParams{
19 From: "Acme <onboarding@yourdomain.com>",
20 To: []string{c.PostForm("to")},
21 Subject: "Hello from Gin",
22 Html: "<strong>It works!</strong>",
23 })
24 if err != nil {
25 c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
26 return
27 }
28 c.JSON(http.StatusOK, gin.H{"id": email.ID})
29 })
30
31 r.Run(":8080")
32}
3

GitHub, examples, and API reference

4

Need more help?

Send with Gin.

Get an API key and ship transactional email from Gin using the official Go SDK.

Reloop