Skip to content

vorobeyme/mailtrap-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published