Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToSendEmail = errors.New("failed to send email") ErrMissingFromEmail = errors.New("missing from email address") ErrFailedToCreateClient = errors.New("failed to create client") ErrMissingCredentials = errors.New("missing server or account token") )
Predefined postmark adapter errors.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Postmark service wrapper
func New ¶
New func is a factory function, returns a new instance of the Client interface implementation
func (*Client) SendEmail ¶
SendEmail sends an email. It returns an error if sending fails. SendEmail sends an email using the Postmark client. It takes a context and a SendEmailPayload as input. The SendEmailPayload contains the necessary information for the email, such as the recipient, subject, body, and attachments. The function returns an error if the email fails to send.
type Config ¶
type Config struct { // From is the email address to use for the from header. This must be a verified sender signature. From string // ReplyTo is the email address to use for the reply-to header. ReplyTo string // TrackOpens is a boolean indicating if you want to track opens. TrackOpens bool // TrackLinks is a boolean indicating if you want to track links. TrackLinks bool }
Config struct
Click to show internal directories.
Click to hide internal directories.