mail

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveInvalidRecipients added in v0.0.9

func RemoveInvalidRecipients(recipients []server.EmailRecipient, allowedDomains []string) []server.EmailRecipient

RemoveInvalidRecipients accepts a list of recipients and removes the ones with domains not in the allowed list

func SendBulkMail

func SendBulkMail(toList []server.EmailRecipient, from server.EmailSender, cc []server.EmailRecipient, bcc []server.EmailRecipient, headers map[string]string, message server.MailMessage, client Client, responseChannel chan BulkSendAttempt)

SendBulkMail sends a batch of email messages to all the specified recipients All the calls to send mail happen in parallel, with their responses returned on the provided channel

func SendIndividualMail

func SendIndividualMail(to []server.EmailRecipient, from server.EmailSender, cc []server.EmailRecipient, bcc []server.EmailRecipient, headers map[string]string, message server.MailMessage, client Client, tags []string, customArgs map[string]string) (*rest.Response, error)

SendIndividualMail sends an email message

Types

type BulkSendAttempt

type BulkSendAttempt struct {
	EmailAddress string
	Response     *rest.Response
	Error        error
}

type Client

type Client interface {
	Send(email *sendgridMail.SGMailV3) (*rest.Response, error)
}

Jump to

Keyboard shortcuts

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