Go-gpalu

A Go implementation of the gpa.lu api

Installation

go get github.com/MonkeySkid/go-gpalu

Usage

package main

import (
    "fmt"

    "github.com/MonkeySkid/go-gpalu"
)

func main() {
    client := gpalu.NewClient(nil /* you can set your http client here */)

    inbox, err := client.GetInbox("[email protected]")
    if err != nil {
        /* handle error */
    }
    recentEmail := inbox[0] // Get first email

    content := client.GetEmailContent("[email protected]", recentEmail.ID)

    fmt.Println("From:", recentEmail.FromEmail)
    fmt.Println("Subject:", recentEmail.Subject)
    fmt.Println("Content:", content)

    // Delete the email
    client.DeleteEmail("[email protected]", recentEmail.ID)
}

Contribute

make a pull request !

GitHub

View Github