mailer

package
v0.0.0-...-ac0e98d Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mailer provides an interface and a Gmail implementation for sending emails.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GmailMailer

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

GmailMailer is an implementation of the Mailer interface that sends emails using Gmail's SMTP server.

func (*GmailMailer) SendEmail

func (mailer *GmailMailer) SendEmail(
	subject string,
	content string,
	to []string,
	cc []string,
	bcc []string,
	attachFiles []string,
) error

type Mailer

type Mailer interface {
	SendEmail(
		subject string,
		content string,
		to []string,
		cc []string,
		bcc []string,
		attachFiles []string,
	) error
}

Mailer is the interface that defines the method for sending emails.

func NewGmailMailer

func NewGmailMailer(name string, fromEmailAddress string, fromEmailPassword string) Mailer

NewGmailMailer creates a new GmailMailer instance.

Jump to

Keyboard shortcuts

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