email

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmailSendgrid

func NewEmailSendgrid(
	sendGridApiKey,
	senderEmail,
	senderName string) *emailSendgrid

func NewEmailSmtp

func NewEmailSmtp(senderEmail, smtpPassword, smtpHost, smtpPort string) *emailSmtp

Types

type Email

type Email interface {
	// Init initializes the email service with the provided options.
	Init(opts ...EmailOption) error

	// SendMail sends an email to the specified recipients.
	//
	// Parameters:
	// - to: List of email addresses to send the email to.
	// - subject: Subject of the email.
	// - message: Body of the email.
	SendMail(to []string, subject, message string) error

	// Options returns the current configuration options of the email service.
	Options() EmailOptions

	// String returns a string representation of the email service.
	String() string
}

Email defines an interface for an email service.

It provides methods for initializing the service, sending general emails, and sending specific types of emails such as account password reset and invitations.

type EmailOption

type EmailOption func(opt *EmailOptions) (*EmailOptions, error)

EmailOption defines a function type for setting options on the Email service.

It allows for configuring the Email service by applying various options.

type EmailOptions

type EmailOptions struct {
}

EmailOptions represents configuration options for the Email service.

It is currently an empty struct, but can be extended in the future.

Jump to

Keyboard shortcuts

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