Tidal-go

GoDoc Go report

Unofficial go library for tidal.lol (tempmail)

Features

  • Instantly recieve emails
  • No dependencies
  • Auto inbox checker
    • easily listen for specific email to be recieved
  • … more

Installation

go get -u github.com/balluh/tidal-go

Usage

Manually Recieving Emails

package main

import (
    "fmt"
    "github.com/balluh/go-tidal"
)

func main() {
    td := tidal.New("tidal.lol") // Or your own domain

    // or td.MustEmails
    emails, err := td.Emails("testing")
    if err != nil {
        panic(err)
    }

    for _, email := range emails {
        fmt.Println(email)
    }
}

Using The Auto Checker

package main

import (
    "fmt"
    "github.com/balluh/go-tidal"
)

func main() {
    td := tidal.New("tidal.lol")

	var check = func(e *tidal.Email) bool {
		return strings.Contains(e.Content, "hello")
	}

    email, err := td.NewChecker("testing").
        WithInterval(1 * Time.Second).
        WithCheck(check).
        WithLimit(100).
        Start() /* or MustStart() */

    if err != nil {
        panic(err)
    }

    fmt.Println(email)
}

GitHub

View Github