mailtrap-go

module
v0.0.0-...-91ab10e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: MIT

README

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

Directories

Path Synopsis
examples
sending/sendemail
The command uses package as a CLI tool to show an example of how to send an email.
The command uses package as a CLI tool to show an example of how to send an email.
testing/account_users
An example of how to use Messages methods.
An example of how to use Messages methods.
testing/accounts
An example of how to use Account methods.
An example of how to use Account methods.
testing/attachments
An example of how to use Messages methods.
An example of how to use Messages methods.
testing/inboxes
An example of how to use Messages methods.
An example of how to use Messages methods.
testing/messages
An example of how to use Messages methods.
An example of how to use Messages methods.
testing/permissions
An example of how to use Messages methods.
An example of how to use Messages methods.
testing/projects
An example of how to use Project methods.
An example of how to use Project methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL