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
Click to show internal directories.
Click to hide internal directories.