email

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 7 Imported by: 0

README

email

TODO


Copyright (c) 2022 Archivage Numérique

Documentation

Overview

Package email TODO

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