Documentation ¶
Overview ¶
Package gomailer provides a simple email interface to integrate third party email services
Index ¶
Constants ¶
View Source
const ( // MAILGUN driver MAILGUN driver // SENDGRID driver SENDGRID // POSTMARK driver POSTMARK // MAILJET driver MAILJET // CUSTOMERIO driver CUSTOMERIO )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configs ¶
type Configs struct { ServerToken string // ServerToken for service like postmarkapp AccountToken string // AccountToken for service like postmarkapp APIKey string // APIKey represents the API key for mail service like mailgun PrivateKey string // PrivateKey represents the PrivateKey provided by service like mailjet PublicKey string // PublicKey represents the PublicKey provided by service like mailjet BaseURL string // BaseURL represents the base url for service Domain string // Domain represents the domain of the service Username string // Username represents the username for service Password string // Password represents the password for service RequestTimeout time.Duration // RequestTimeout represents the timeout for http client call }
Configs represents the configurations
type Mailer ¶
type Mailer interface { // From set sender email address for an email From(name, from string) Mailer // From set receipents email address for an email To(name, to string) Mailer // From set Cc receipents email address for an email Cc(name, to string) Mailer // From set Bcc receipents email address for an email Bcc(name, to string) Mailer // ReplyTo sets reply-to for an email ReplyTo(name, email string) Mailer // Subject sents Subject of an email Subject(sub string) Mailer // BodyHTML sets html body for an email BodyHTML(html string) Mailer // BodyText sets plain text body for an email BodyText(text string) Mailer // AttachmentFile sets email attachments from file name on disk AttachmentFile(file string) Mailer // AttachmentInlineFile sets email inline attachments from file name on disk AttachmentInlineFile(file string) Mailer // AttachmentReader sets email attachments from file name and reader AttachmentReader(file string, r io.Reader) Mailer // AttachmentInlineFile sets email inline attachments from file name and reader AttachmentInlineReader(file string, r io.Reader) Mailer // Send process an email sending Send() error }
Mailer describes a common mailer interface for different email service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.