Documentation
¶
Overview ¶
Package tempmail reads disposable inboxes from generator.email.
Index ¶
- func ExtractCode(message Message) string
- type Generator
- func (g *Generator) Domains(ctx context.Context) ([]string, error)
- func (g *Generator) Generate(_ context.Context, domain string) (string, error)
- func (g *Generator) Messages(ctx context.Context, address string) ([]Message, error)
- func (g *Generator) WaitForCode(ctx context.Context, address string) (string, error)
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractCode ¶
ExtractCode pulls a verification code from the subject or text body.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is a client for generator.email. Call NewGenerator to construct it.
func NewGenerator ¶
func (*Generator) Generate ¶
Generate mints an address locally. Every address on the domain is already live.
type Message ¶
type Message struct {
ID int64 `json:"id"`
Address string `json:"address"`
FromAddress string `json:"from"`
Subject string `json:"subject"`
TextBody string `json:"text_body"`
HTMLBody string `json:"html_body"`
ReceivedAt time.Time `json:"received_at"`
// contains filtered or unexported fields
}
Message is one received disposable email.