mailmeclient

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 5 Imported by: 0 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.

Documentation

Overview

Package mailmeclient provides an implementation of mailer.Client that uses gopkg.in/gomail.v2 to send via SMTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	From      string
	Host      string
	Port      int
	User      string
	Pass      string
	LocalName string

	Logger      logrus.FieldLogger
	MailLogging bool
}

Client lets MailMe send templated mails

func New

func New(globalConfig *conf.GlobalConfiguration) *Client

New returns a new *Mailer based on the given configuration.

func (*Client) Mail

func (m *Client) Mail(
	ctx context.Context,
	to string,
	subject string,
	body string,
	headers map[string][]string,
	typ string,
) error

Mail sends a templated mail. It will try to load the template from a URL, and otherwise fall back to the default

Jump to

Keyboard shortcuts

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