client

package module
v0.0.0-...-21d9f9e Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Server   string `json:"server"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
}

type Info

type Info struct {
	Version string
	Secure  bool
}

type Mailer

type Mailer struct {
	Url string
}

func (*Mailer) Info

func (mailer *Mailer) Info() (*Info, error)

func (*Mailer) IsSecure

func (mailer *Mailer) IsSecure() (bool, error)

func (*Mailer) SendMail

func (mailer *Mailer) SendMail(message Message, authentication *Authentication) error

func (*Mailer) SendMailRequest

func (mailer *Mailer) SendMailRequest(request Request) error

func (*Mailer) SendSecureMail

func (mailer *Mailer) SendSecureMail(user User, message Message, authentication *Authentication) error

func (*Mailer) SendSecureMailRequest

func (mailer *Mailer) SendSecureMailRequest(user User, request Request) error

type Message

type Message struct {
	From      string `json:"from,omitempty"`
	To        string `json:"to" example:"me@gmail.com,you@gmail.com"`
	Subject   string `json:"subject"`
	Body      string `json:"body,omitempty"`
	HtmlBody  string `json:"html_body,omitempty" example:"Hello!"`
	PlainBody string `json:"plain_body,omitempty" example:"<p>Hello!</p>"`
}

type Request

type Request struct {
	Message        Message         `json:"message"`
	Authentication *Authentication `json:"authentication,omitempty"`
}

type User

type User struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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