mail

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Hostname    string
	Host        string
	User        string
	Pass        string
	DefaultFrom string
	Port        int
}

type Mail

type Mail struct {
	ExtraHeaders MailHeader
	Sender       string
	Subject      string
	BodyPlain    string
	BodyHtml     string
	To           []string
}

type MailHeader

type MailHeader map[string]string

type MailSender

type MailSender interface {
	SendRaw(*Mail) error
	Send(string, []string, string, string, string, MailHeader) error
	SendAsync(string, []string, string, string, string, MailHeader)
}

type Mailer

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

func NewMailer

func NewMailer(conf *Config) *Mailer

func (*Mailer) Send

func (m *Mailer) Send(from string, to []string, subject, bodyPlain, bodyHtml string, extraHeaders MailHeader) error

func (*Mailer) SendAsync

func (m *Mailer) SendAsync(from string, to []string, subject, bodyPlain, bodyHtml string, extraHeaders MailHeader)

func (*Mailer) SendRaw

func (m *Mailer) SendRaw(mail *Mail) error

Directories

Path Synopsis
Package mockmail is a generated GoMock package.
Package mockmail is a generated GoMock package.

Jump to

Keyboard shortcuts

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