Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.51 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.51 KB

mailtrap-go

Go Reference Go codecov Go Report Card

Unofficial Mailtrap API client for Go.

The public API documentation is available at https://api-docs.mailtrap.io.

NOTE: THIS PACKAGE IS STILL UNDER DEVELOPMENT.

Installation

go get github.com/vorobeyme/mailtrap-go

Usage

import "github.com/vorobeyme/mailtrap-go"

Create a new Mailtrap client, then use the exposed services to access different parts of the Mailtrap API.

package main

import (
    "log"

    "github.com/vorobeyme/mailtrap-go"
)

func main() {
    client, err := mailtrap.NewSendingClient("api-token")
    if err != nil {
        log.Fatal(err)
    }

    email := &mailtrap.SendEmailRequest{ ... }
    resp, _, err := client.SendEmail.Send(email)
}

Examples

To find code examples that demonstrate how to call the Mailtrap API client for Go, see the examples folder.

License

MIT License