email

package module
v0.0.0-...-86581ab Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

email

AFAIRE


Copyright (c) 2022-2023 Archivage Numérique

Documentation

Index

Constants

View Source
const HTML = `` /* 724-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Name() string
	Version() string
	BuiltAt() time.Time
	StartedAt() time.Time
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(name string, addr string) *Client

func (*Client) Send

func (c *Client) Send(email *Email, to ...string) error

type DataHTML

type DataHTML struct {
	Application string
	Version     string
	BuiltAt     string
	StartedAt   string
	BGColor     string
	Timestamp   string
	Title       string
	Content     string
}

func Error

func Error(app Application, title string) *DataHTML

func Info

func Info(app Application, title string) *DataHTML

func Warning

func Warning(app Application, title string) *DataHTML

type Email

type Email struct {
	// contains filtered or unexported fields
}

func Create

func Create(subject string, data any, templates ...string) (*Email, error)

func New

func New(opts ...Option) *Email

func (*Email) Send

func (e *Email) Send(addr string) error

type Option

type Option func(*Email)

func WithBlindCarbonCopy

func WithBlindCarbonCopy(bcc string) Option

func WithCarbonCopy

func WithCarbonCopy(cc string) Option

func WithFrom

func WithFrom(from string) Option

func WithHTML

func WithHTML(body []byte) Option

func WithSubject

func WithSubject(subject string) Option

func WithText

func WithText(body []byte) Option

func WithTo

func WithTo(to string) Option

Jump to

Keyboard shortcuts

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