mailgun

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mailgun is used for sending emails via mailgun

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFailedToSendEmail is returned when an email fails to send
	ErrFailedToSendEmail = errors.New("failed to send email")
)

Functions

This section is empty.

Types

type MGOption

type MGOption func(*MailgunEmailSender)

func WithEurope

func WithEurope() MGOption

WithEurope sets the API Mailgun base url to Europe region.

type MailgunEmailSender

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

func NewMailgunEmailSender

func NewMailgunEmailSender(domain, apikey string, opts ...MGOption) *MailgunEmailSender

func (*MailgunEmailSender) SendEmail

func (s *MailgunEmailSender) SendEmail(ctx context.Context, message *newman.EmailMessage) error

SendEmail sends an email using the Mailgun API

Jump to

Keyboard shortcuts

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