gmailnator

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 8 Imported by: 1

README

Go-Gmailnator

Latest Tag Test Status

A Go package for generating random gmail address and receiving emails.

Installation

go get github.com/bunniesnu/go-gmailnator

Usage

// Check latest test results
available, err := gmailnator.available()

// Initialize Gmailnator
gmail, err := gmailnator.NewGmailnator()

// Generate a new random Gmail address
err = gmail.GenerateEmail()

// Get lists of received emails
mailList, err := gmail.GetMails()

// Get the body of each email
for _, mail := range mailList {
    messageId := mail.Mid
    mailDetails, err := gmail.GetMailBody(messageId)
}

This was made for educational purposes only, nobody which directly involved in this project is responsible for any damages caused. You are responsible for your actions.

License

MIT

Documentation

Index

Constants

View Source
const RecaptchaAnchorURL = "" /* 192-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type CookieData

type CookieData struct {
	XSRFToken string
}

func NewCookie

func NewCookie(baseURL string) (*CookieData, *http.Client, error)

type Email

type Email struct {
	Email     string `json:"email"`
	Timestamp int64  `json:"timestamp"`
}

type Gmailnator

type Gmailnator struct {
	XSRFToken string
	Client    *http.Client
	Email     *Email
	RapidAPI  string
}

func NewGmailnator

func NewGmailnator() (*Gmailnator, error)

func (*Gmailnator) GenerateEmail

func (g *Gmailnator) GenerateEmail() error

func (*Gmailnator) GetKey

func (g *Gmailnator) GetKey(jsonData, captchaToken string) (string, error)

func (*Gmailnator) GetMailBody

func (g *Gmailnator) GetMailBody(messageId string) (string, error)

func (*Gmailnator) GetMails

func (g *Gmailnator) GetMails() ([]ReceivedEmail, error)

type ReceivedEmail

type ReceivedEmail struct {
	Mid     string `json:"mid"`
	From    string `json:"textFrom"`
	Date    string `json:"textDate"`
	Subject string `json:"textSubject"`
	To      string `json:"textTo"`
}

type ReceivedEmailDetail

type ReceivedEmailDetail struct {
	Body string `json:"body"`
}

Jump to

Keyboard shortcuts

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