Documentation ¶
Overview ¶
Package relay provides an interface to relay emails via Amazon SES/Pinpoint API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDeniedSender = errors.New( "denied sender: sender does not match the allowed emails regexp", ) ErrDeniedRecipients = errors.New( "denied recipients: recipients match the denied emails regexp", ) )
Functions ¶
func FilterAddresses ¶
func FilterAddresses( from string, to []string, allowFromRegExp *regexp.Regexp, denyToRegExp *regexp.Regexp, ) (allowedRecipients []*string, deniedRecipients []*string, err error)
FilterAddresses validates sender and recipients and returns lists for allowed and denied recipients. If the sender is denied, all recipients are denied and an error is returned. If the sender is allowed, but some of the recipients are denied, an error will also be returned.
Types ¶
Click to show internal directories.
Click to hide internal directories.