mailto

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mailto provides a method for easily constructing a mailto: string for use in links.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(to string, options ...Option) string

Build creates a new html link with a `mailto:` href attribute.

Types

type MailTo

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

MailTo represents a link that will open the user's mail client, with optionall pre-filled details).

type Option

type Option func(*MailTo)

Option is a functional option to apply to a mailto: link object.

func WithBody

func WithBody(body string) Option

WithBody option adds body text to the mailto: link.

func WithSubject

func WithSubject(subject string) Option

WithSubject option adds a subject to the mailto: link.

Jump to

Keyboard shortcuts

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